Skip to content

ModuleNotFoundError: No module named 'pages.' #113

Closed
@charmeem

Description

When trying to run the demo code of Chapter08-MultiPageDashApp I am getting this error.
This error however doesn't generates if I include only histogram.py file in /pages folder.
As I add other files like bar_charts.py this error appears.

Detail print out:

(base) c:\my_drive\python\dashboards\plotlydash\flaskdash1>python app.py
Traceback (most recent call last):
  File "app.py", line 6, in <module>
    app = dash.Dash(
  File "C:\Users\hp\anaconda3\lib\site-packages\dash\dash.py", line 420, in __init__
    plugin.plug(self)
  File "C:\Users\hp\anaconda3\lib\site-packages\dash_labs\plugins\pages.py", line 327, in plug
    _import_layouts_from_pages(pages_folder)
  File "C:\Users\hp\anaconda3\lib\site-packages\dash_labs\plugins\pages.py", line 301, in _import_layouts_from_pages
    page_module = importlib.import_module(f"pages.{page_filename}")
  File "C:\Users\hp\anaconda3\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pages.'

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions