question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'pages.'

See original GitHub issue

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.'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:21

github_iconTop GitHub Comments

4reactions
charmeemcommented, Jun 13, 2022

OK, appreciate the work you are doing designing this wonderful product, keep it up !

2reactions
charmeemcommented, Jun 13, 2022

All working now, Thanks for your hints.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'pages'
Creating a beginners app using Django/Python: ModuleNotFoundError: No module named 'pages' · Subscribe to RSS.
Read more >
No module named "pages" - Python - The freeCodeCamp Forum
In 1:04:55 there is code that says from pages import views. But the console says this when I run the server ModuleNotFoundError: No...
Read more >
ModuleNotFoundError: No module named ... - RoseIndia.Net
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'pages' How to remove the ModuleNotFou.
Read more >
name__ module not working correctly in multi page app
I have been trying to use path variables in my multi page app, ... to what you are seeing: ModuleNotFoundError: No module named...
Read more >
Writing your first Django app, part 1
If Django is installed, you should see the version of your installation. If it isn't, you'll get an error telling “No module named...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found