Superset 1.0.1 遇到的坑及解决方案(2021年4月5日)

1.直接安装pip install apache-superset 容易出现错误,可以先安装以下两个依赖库:

python_geohash-0.8.5-cp37-cp37m-win_amd64.whl
sasl-0.2.1-cp37-cp37m-win_amd64.whl

大家自行到https://www.lfd.uci.edu/~gohlke/pythonlibs下载

2.连接mysql数据库的时候报错

可以先安装依赖库:pip install mysqlclient

3.Sql查询的时候报以下错误 Database error Instance <Query at 0x17926600e88> is not bound to a Session

Database error
Instance <Query at 0x17926600e88> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: http://sqlalche.me/e/13/bhk3)

可以找到 环境中这个目录下 superset\Lib\site-packages\superset\utils的core.py文件,修改对应代码块:(大概在727到745行)

    def __enter__(self) -> None:
        try:
            if threading.current_thread() == threading.main_thread():
                # signal.signal(signal.SIGALRM, self.handle_timeout)
                # signal.alarm(self.seconds)
                pass
        except ValueError as ex:
            logger.warning("timeout can't be used in the current context")
            logger.exception(ex)
 
    def __exit__(  # pylint: disable=redefined-outer-name,unused-variable,redefined-builtin
        self, type: Any, value: Any, traceback: TracebackType
    ) -> None:
        try:
            # signal.alarm(0)
            pass
        except ValueError as ex:
            logger.warning("timeout can't be used in the current context")
            logger.exception(ex)
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值