Incubator-superset: on windows in superset sql lab error "module object has no attribute sigalrm"

Created on 2 Nov 2017  路  7Comments  路  Source: apache/incubator-superset

on windows in superset sql lab error "module object has no attribute sigalrm"

there is one solution on internet that edit utils.py ,plus# before the two sentences below and plus another sentence "pass"

signal.signal(signal.SIGALRM, self.handle_timeout)

#signal.alarm(self.seconds)
pass

but above can't solve problem and report another error can't connect the datebase, who know why? and how to solve?

Superset version

Expected results

Actual results

Steps to reproduce

.windows inactive

Most helpful comment

It works after doing the following change (sorry for the massed up alignment, problems with github formatting):

def __enter__(self):

    try:

        #signal.signal(signal.SIGALRM, self.handle_timeout)

        #signal.alarm(self.seconds)

        pass

    except ValueError as e:

        logging.warning("timeout can't be used in the current context")

        logging.exception(e)

def __exit__(self, type, value, traceback):
try:

        #signal.alarm(0)

        pass
    except ValueError as e:
        logging.warning("timeout can't be used in the current context")
        logging.exception(e)`

All 7 comments

I think you have missed that superset is not supported on Windows. The internet should really stop to provide bad advice.

It works after doing the following change (sorry for the massed up alignment, problems with github formatting):

def __enter__(self):

    try:

        #signal.signal(signal.SIGALRM, self.handle_timeout)

        #signal.alarm(self.seconds)

        pass

    except ValueError as e:

        logging.warning("timeout can't be used in the current context")

        logging.exception(e)

def __exit__(self, type, value, traceback):
try:

        #signal.alarm(0)

        pass
    except ValueError as e:
        logging.warning("timeout can't be used in the current context")
        logging.exception(e)`

hi Mr. guylando, which file you modified?

modify this file:utils.py.
the issue has solved follow up the guide of Mr. guylando @guylando

Hello fredtong,
could you pls tell me which utils.py file did you modify?

I have just listed more then 30 files for this name under the path : C:\Users\MCM\AppData\Local\Programs\Python\Python36\Scripts\venv\Lib\site-packages*.
different subfolders content such files.
Here below I am reporting just three paths for example:

  1. C:\Users\MCM\AppData\Local\Programs\Python\Python36\Scripts\venv\Lib\site-packages\pip_vendor\pytoml
  1. C:\Users\MCM\AppData\Local\Programs\Python\Python36\Scripts\venv\Lib\site-packages\setuptools_vendor\packaging

  2. C:\Users\MCM\AppData\Local\Programs\Python\Python36\Scripts\venv\Lib\site-packages\pip_vendor\requests
    ....
    Many thanks in advance!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

modify this file:utils.py.
the issue has solved follow up the guide of Mr. guylando @guylando

superset version=0.35.1
modify this file utils/core.py

Was this page helpful?
0 / 5 - 0 ratings