Pytest error in M220P

pytest -m connection
Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\Scripts\”, line 6, in
from py.test import console_main
ImportError: cannot import name ‘console_main’ from ‘pytest’ (unknown location)

How do I resolve this?

Have you created and activated your virtual env?

Post a screenshot that show your whole setup.

thanks for quick reply. i had conda virtual env active. I googled this query. I found that old pytest version does not support this console_main functionality. In the new version, it is supported. So, I upgrade pytest version and it works.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.