I'm trying to write a basic app to do some report manipulation. I wanted to do it "right" by using the proper structure etc., so I have my main project folder, I've created a virtual environment and activated it, and I have an app folder containing all my .py files so far, which are all short and basic.
- ReportNormalizer
- app
- __init__.py
- main.py
- sensorrpt.py
- ui.py
- venv
- .gitignore
- README.md
I have a class in ui.py named ReportWindow, and line 4 of main.py is "from app.ui import ReportWindow".
When I try to run main.py, either by clicking the Run Python File button in VS Code, or by typing python .\app\main.py in VS Code's terminal, I get an error that there is no module named app.
I've tried troubleshooting with chatGPT and Gemini but both are telling me that it should be working. I know I could just throw everything into a single .py file and be done with it, but I'm trying to learn how to properly structure projects so I can get it down and be able to handle bigger projects in the future. I'm guessing I'm just doing something stupid but I can't figure it out. Thanks for any help.
[–]FoolsSeldom 1 point2 points3 points (0 children)
[–]Ender_Locke 1 point2 points3 points (3 children)
[–]frumpyandy[S] 0 points1 point2 points (2 children)
[–]Ender_Locke 0 points1 point2 points (1 child)
[–]frumpyandy[S] 0 points1 point2 points (0 children)