Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Django - dash raise ImportError: cannot import name 'Dash' from 'dash'

$
0
0

There’s actually no useful solution online. I get this error :

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/app/.heroku/python/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/app/.heroku/python/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/app/.heroku/python/lib/python3.8/site-packages/django/apps/config.py", line 116, in create
    mod = import_module(mod_path)
  File "/app/.heroku/python/lib/python3.8/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 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/app/.heroku/python/lib/python3.8/site-packages/django_plotly_dash/__init__.py", line 31, in <module>
    from .dash_wrapper import DjangoDash
  File "/app/.heroku/python/lib/python3.8/site-packages/django_plotly_dash/dash_wrapper.py", line 32, in <module>
    from dash import Dash
ImportError: cannot import name 'Dash' from 'dash' (/app/.heroku/python/lib/python3.8/site-packages/dash/__init__.py)

while pushing an app that contains dash components to heroku. It seems something is wrong with paths here. It happend during collectstatic phase.

tried to set :

collectstatic = 1

pushing is then successful but running collectstatic after that results in the same problem. Any suggestion ?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images