Problem with running tests

Hi,

I have completed Chapter 3 and I’m on Chapter 4.
For some reason I had to delete my python virtual environment and recreate it.
I install packages again using : pip install -r requirements.txt which worked fine.

Now I am unable to run the below command:
pytest -m connection_pooling

I am getting the below error when I run the above in command line.

Can someone help me resolve this ?

Potentially convert does not exist in the version of the attrib library that’s being used. Did you install python 3?

Yes, I am already using Python 3. everything was working fine before I recreated my virtual environment.
Can you suggest something I can try to troubleshoot this?

I suspect that the Python installed on your Virtual Machine is an incompatible version. Log into your VM and check which version you have installed: python -V

Hi @Rounak_65961,

Can you try without your VM? And try running the command again.

Kanika

Do you mean Python Virtual environment ?

I am also having the same issue. I do have Python 3.7 installed.

Can you try using pytest -m connection? Let me know the output.

Kanika

@msymmonds, the Curriculum Engineers (i.e. Kanika) is (I believe) finished for the day so I’ll try and help.

Are you running these tests from a virtual machine or on your host machine?

You can try doing the following which helped me out someway:

  • Create a new virtual environment
  • Switch the to new venv that you created.
  • Install the dependencies in requirements.txt
  • Upgrade all the packages that you installed using requirements.txt in your virtual environment.
  • Now try running the tests
1 Like

Also, I found this solution below:

    pip install attrs==19.1.0

Let me know what works for you.

Kanika

1 Like

I am working in the venv. I was able to fix it by uninstalling all the dependencies in requirements.txt. Then I went into the requirements.txt and removed all the specific versions. Once all the latest versions were installed, I encountered no issues and was able able to run pytest normally.

1 Like

@Rounak_65961, @msymmonds

See comments from @Rich_92982, you just need to downgrade to a lower version:

convert() has been deprecated in favour of converter() as per attrs release notes:

@kanikasingla please pass on to your Dev guys to fix.

Thanks for sharing the feedback @007_jb.

Kanika