加载数据后,点击【Run Query】,会出现运行错误。

原因是缺少几个包,可以在代码层面修改源码的形式修改。

在cmd里关闭superset。

进入 D:\soft\anaconda\envs\superset\Lib\site-packages\superset\utils

将core.py文件里的

    def __enter__(self):
        try:
            signal.signal(signal.SIGALRM, self.handle_timeout)
            signal.alarm(self.seconds)
        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)
        except ValueError as e:
            logging.warning("timeout can't be used in the current context")
            logging.exception(e)

改为

    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)

重新在cmd里打开superset,即可。