Cannot import module

If you’re creating a debugging post, please include the following info:

  1. Link: https://testingapp-lr58z88pdeiupx6usewjrj.streamlit.app
  2. Github Link: GitHub - DinisAT/testing_app: hello
  3. ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).

Traceback:

File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
    exec(code, module.__dict__)File "/prod/app/app.py", line 1, in <module>
    from prod.model.main import printing
  1. Python 3.10.6

Im creating a simple tree to deploy an app just for testing. Why it cannot recognize the path?

Thank you for the small example! Your import statement doesn’t seem to reflect your current directory structure. You have from model.main import ... but there is no directory or module named model. Did you mean from main.main?

You are right… I already updated it… I was playing with the folder and the code, and forgot to put it back to normal. Still with the correct path it doesn’t seem to run. Now I updated main.main