-1

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' 

enter image description here

Looking at the package installed in virtaul environment created by tox, i see the following files in aws_sray_sdk :

enter image description here

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:

enter image description here

Can someone please help me with this.

Noor
  • 126
  • 2
  • 8
  • 2
    In future, please do not post screenshots, but rather properly formatted/copied code. Also, in order to debug tox issues, it is always very helpful to have the output of `tox - rvv` Thanks! – Jürgen Gmach May 24 '22 at 05:53

1 Answers1

0

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.

Jürgen Gmach
  • 5,366
  • 3
  • 20
  • 37