You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/09 17:44:48 UTC

[GitHub] [superset] mohimirza edited a comment on issue #12824: Error running SQL Lab

mohimirza edited a comment on issue #12824:
URL: https://github.com/apache/superset/issues/12824#issuecomment-776115082


   @liuxp311 @beautah @jokus-pokus
   
   The problem seems to be caused by SIGALRM. Here is a workaround which has worked for me.
   In **Lib\site-packages\superset\utils\core.py** replace:
   
   ```
     def __enter__(self):
         try:
             signal.signal(signal.SIGALRM, self.handle_timeout)
             signal.alarm(self.seconds)
         except ValueError as e:
             logger.warning("timeout can't be used in the current context")
             logger.exception(e)
   
     def __exit__(self, type, value, traceback):
         try:
             signal.alarm(0)
         except ValueError as e:
             logger.warning("timeout can't be used in the current context")
             logger.exception(e)
   
   ```
   
   with
   
   ```
       def __enter__(self):
           try:
               #signal.signal(signal.SIGALRM, self.handle_timeout)
               #signal.alarm(self.seconds)
               pass
           except ValueError as e:
               logger.warning("timeout can't be used in the current context")
               logger.exception(e)
   
       def __exit__(self, type, value, traceback):
           try:
               #signal.alarm(0)
               pass
           except ValueError as e:
               logger.warning("timeout can't be used in the current context")
               logger.exception(e)
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org