Importerror:无法导入名称' global_sdk_config'来自' aws_xray_sdk'
通过TOX,我试图在本地进行单元测试。该测试似乎失败了,给我以下错误:
from aws_xray_sdk import global_sdk_config
E ImportError: cannot import name 'global_sdk_config' from 'aws_xray_sdk'
。
inspection,我看到自己何时创建了虚拟环境(无毒物)并运行PIP install aws-xray-sdk,我还看到 sdk_config.py and version.py 在软件包中aws_sdk_xray中如下所示:
有人可以帮助我。
Through Tox i am trying to run a unit test in my local. The test seems to fail, giving me the following error:
from aws_xray_sdk import global_sdk_config
E ImportError: cannot import name 'global_sdk_config' from 'aws_xray_sdk'
Looking at the package installed in virtaul environment created by tox, i see the following files in aws_sray_sdk :
Upon closer insepection, i see when i had created virtual environment myself (without tox) and run pip install aws-xray-sdk, i also see sdk_config.py
and version.py in package aws_sdk_xray as shown below:
Can someone please help me with this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在屏幕截图中,您向我们展示了运行Python 3.7环境的Tox,在以下屏幕截图中,您向我们展示了Python 3.6的站点包装。
这些不匹配。
您需要确保检查正确的托克斯环境。
In the screenshot you show us tox running a Python 3.7 environment, and in the following screenshots you show us the site-packages of Python 3.6.
These do not match.
You need to make sure you inspect the correct tox environment.