0

Main.py causes error when in a folder but not when in test folder

Every time I run a .py file in Pycharm when it is in a folder this error happens. I speculate that it has something to do with the interpreter or the virtual environment but I am not sure. The interpreter does not allow me to find or employ other interpreters either. Information for this and the code I was using is in the photo, I am new to programming and have yet to find anyone else with this problem (unless it's a feature).

Haj
  • 1

1 Answers1

0

Change the folder name from pomodoro-start to pomodoro_start; symbols like (@#$%^&*-) will cause the Python interpreter to not recognize it as a valid folder on the path.

From your picture:
'/Users/andrewwong/PycharmProjects/test/main.py'
should be:
'/Users/andrewwong/PycharmProjects/test/pomodoro_start/main.py'
Hope this helps you

Piyush Pandita
  • 181
  • 1
  • 1
  • 12
  • Thank you for the input! It did not work but I think it was because the virtual environment configures main.py to the main folder and doesnt change after I put it inside. Fixed now! – Haj May 21 '22 at 23:33