Ricman1029
Ricman1029

Reputation: 23

ModuleNotFoundError only when I run flet app from terminal

I'm working on a flet app and everything works fine when I run the app using PyCharm. The problem is that I want to try the hot reload provided by flet but when I run the app via the terminal I get a ModuleNotFoundError

(.venv) PS C:\Users\ricar\proyectos_flet\legajos_automaticos> flet run -d main.py
Traceback (most recent call last):
  File "C:\Users\ricar\proyectos_flet\legajos_automaticos\src\main.py", line 2, in <module>
    from legajos_automaticos.src.app_layout import AppLayout
ModuleNotFoundError: No module named 'legajos_automaticos'

This error only appears when I run the app from terminal and not when I do so using PyCharm My code structure is like this

proyectos_flet
├── .venv/
└── legajos_automaticos/
    ├── auxil/
    ├── out/
    ├── src/
    │   ├── assets/
    │   ├── controles/
    │   ├── .../
    │   ├── __init__.py
    │   ├── app_layout.py
    │   └── main.py
    ├── storage/
    ├── .gitignore
    ├── __init__.py
    ├── pyproyect.toml
    └── README.md    

Upvotes: 0

Views: 29

Answers (0)

Related Questions