plotly / dash-bio

Open-source bioinformatics components for Dash
https://dash-gallery.plotly.host/Portal/?search=Bioinformatics
MIT License
531 stars 192 forks source link

ModuleNotFoundError: No module named 'layout_helper' #542

Closed bitcometz closed 3 years ago

bitcometz commented 3 years ago

Hello, Could you help with this problem?Thanks:

raceback (most recent call last):
  File "/Users/usr/PycharmProjects/dash/try1/apps/vacalno.py", line 15, in <module>
    from layout_helper import run_standalone_app
ModuleNotFoundError: No module named 'layout_helper'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
    self.load_wsgi()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
    return self.load_wsgiapp()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
    mod = importlib.import_module(module)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/usr/PycharmProjects/dash/try1/apps/vacalno.py", line 17, in <module>
    from .layout_helper import run_standalone_app
ImportError: attempted relative import with no known parent package
HammadTheOne commented 3 years ago

Hi @bitcometz

A little while ago, the structure of the demo apps in the repo was changed and some of the documentation and helper code still needs to catch up with that. That's being tracked in #518 and I'm hoping to have those changes in relatively soon.

For the moment, a simple workaround is to copy over the contents of the common directory in dashbio_demos to the directory of the sample app you are attempting to run, and the layout_helper module, as well as some shared assets will be available to import to the app.

HammadTheOne commented 3 years ago

Closing this issue to follow up in #518 .