Coder Social home page Coder Social logo

DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses about django-plotly-dash HOT 5 OPEN

samarthsarin avatar samarthsarin commented on June 18, 2024
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

from django-plotly-dash.

Comments (5)

delsim avatar delsim commented on June 18, 2024

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

from django-plotly-dash.

samarthsarin avatar samarthsarin commented on June 18, 2024

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 "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in find_and_load_unlocked
File "", line 671, in load_unlocked
File "", line 783, in exec_module
File "", line 219, in call_with_frames_removed
File "C:\Users\ssarin\Anaconda3\lib\site-packages\django_plotly_dash_init
.py", line 31, in
from .dash_wrapper import DjangoDash
File "C:\Users\ssarin\Anaconda3\lib\site-packages\django_plotly_dash\dash_wrapper.py", line 33, in
import dash
File "C:\Users\ssarin\Anaconda3\lib\site-packages\dash_init
.py", line 36, in
from .dash import ( # noqa: F401,E402
File "C:\Users\ssarin\Anaconda3\lib\site-packages\dash\dash.py", line 22, in
from pkg_resources import get_distribution, parse_version
File "C:\Users\ssarin\Anaconda3\lib\site-packages\pkg_resources_init.py", line 73, in
from pkg_resources.extern import appdirs
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in load_unlocked
File "", line 618, in load_backward_compatible
File "C:\Users\ssarin\Anaconda3\lib\site-packages\pkg_resources\extern_init
.py", line 43, in load_module
import(extant)
File "C:\Users\ssarin\Anaconda3\lib\site-packages\pkg_resources_vendor\appdirs.py", line 560, in
import win32com.shell
File "C:\Users\ssarin\Anaconda3\lib\site-packages\win32com_init
.py", line 6, in
import pythoncom
File "C:\Users\ssarin\Anaconda3\lib\site-packages\pythoncom.py", line 2, in
import pywintypes
File "C:\Users\ssarin\Anaconda3\lib\site-packages\win32\lib\pywintypes.py", line 2, in
import imp, sys, os
File "C:\Users\ssarin\Anaconda3\lib\imp.py", line 31, in
warnings.warn("the imp module is deprecated in favour of importlib; "
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

from django-plotly-dash.

delsim avatar delsim commented on June 18, 2024

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.

from django-plotly-dash.

samarthsarin avatar samarthsarin commented on June 18, 2024

from django-plotly-dash.

delsim avatar delsim commented on June 18, 2024

Can you do the following:

  1. launch python
  2. enter import django and press return
  3. enter django.__version__ and press return
  4. enter import dash and press return
  5. enter dash.__version__ and press return

and then report what responses you get for each step?

from django-plotly-dash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.