RUN vs. DEBUG pyTests

Hello there, I'm having a problem with my PyCharm when debugging some pytests.

When I just RUN the test, it works smoothly but when I select DEBUG the test, it complains saying that some modules are not found. When I try other tests in other folder structures, the debugger works. How's that possible? 

from statsforecast.models import SimpleExponentialSmoothing
E   ModuleNotFoundError: No module named 'statsforecast.models'

I already deleted cache, .idea, re-installed PyCharm, removed, and re-created the .venv. I don't know what to do anymore.

Here is a screenshot from my RUN/DEBUG.

1
1 comment

I figured out why it happened. There is a conflict between module names.

I have a python package called statsforecast installed and it is used while I have a sub-folder called statsforecast as well. When I renamed my sub-folder, the debug started to work.

0

Please sign in to leave a comment.