django-plotly-dash
django-plotly-dash copied to clipboard
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
I have install the latest version of django_plotly_dash library. When I add 'django_plotly_dash.apps.DjangoPlotlyDashConfig' in INSTALLED_APPS the following error shows up and my django app doesn't start.
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
Please help me solve this issue.
@samarthsarin is there any more to the error message?
In particular, it would be helpful to know what module contains the import statement leading to this warning.
However, a DeprecationWarning is just that - a warning - and on its own would not (usually!) cause program execution to halt.
python .\source\manage.py runserver
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Users\ssarin\Anaconda3\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\Users\ssarin\Anaconda3\lib\threading.py", line 870, in run
self._target(*self.args, **self.kwargs)
File "C:\Users\ssarin\Anaconda3\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\ssarin\Anaconda3\lib\site-packages\django\core\management\commands\runserver.py", line 125, in inner_run
autoreload.raise_last_exception()
File "C:\Users\ssarin\Anaconda3\lib\site-packages\django\utils\autoreload.py", line 87, in raise_last_exception
raise exception[1]
File "C:\Users\ssarin\Anaconda3\lib\site-packages\django\core\management_init.py", line 394, in execute
autoreload.check_errors(django.setup)()
File "C:\Users\ssarin\Anaconda3\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\ssarin\Anaconda3\lib\site-packages\django_init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\ssarin\Anaconda3\lib\site-packages\django\apps\registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "C:\Users\ssarin\Anaconda3\lib\site-packages\django\apps\config.py", line 178, in create
mod = import_module(mod_path)
File "C:\Users\ssarin\Anaconda3\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
So that warning is arising from some windows-specific functionality that in turn is being loaded by some modules that are being loaded by Dash - its not coming from django-plotly-dash.
As a first step, I would check that python and Dash are correctly installed, and then try importing each of the packages in turn directly from a python REPL prompt.
Hi,
Thank you for the response. Everything independently seems to be working fine and imports are successful. I have tried it on different machines as well as re installing almost all libraries again. Still the same error persists.
On Sat, Aug 12, 2023, 04:35 Mark Gibbs @.***> wrote:
So that warning is arising from some windows-specific functionality that in turn is being loaded by some modules that are being loaded by Dash - its not coming from django-plotly-dash.
As a first step, I would check that python and Dash are correctly installed, and then try importing each of the packages in turn directly from a python REPL prompt.
— Reply to this email directly, view it on GitHub https://github.com/GibbsConsulting/django-plotly-dash/issues/472#issuecomment-1675501676, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSHET7FWB74F4SQF77QRCTXU23E5ANCNFSM6AAAAAA3KAET4M . You are receiving this because you were mentioned.Message ID: @.***>
Can you do the following:
- launch python
- enter
import djangoand press return - enter
django.__version__and press return - enter
import dashand press return - enter
dash.__version__and press return
and then report what responses you get for each step?