[solved]Cannot import Dash?

Somehow I am unable to run my Dash in this new year. My company PC has been dormant through Christmas, and now I am getting an error when I try to import dash.

Can anyone help? :grimacing:

import dash
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\dash_init_.py”, line 1, in
from .dash import Dash # noqa: F401
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\dash\dash.py”, line 18, in
import plotly
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly_init_.py”, line 31, in
from plotly import (plotly, dashboard_objs, graph_objs, grid_objs, tools,
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\plotly_init_.py”, line 10, in
from . plotly import (
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\plotly\plotly.py”, line 28, in
from requests.compat import json as json
File "C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\requests_init
.py", line 43, in
import urllib3
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3_init_.py”, line 8, in
from .connectionpool import (
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\connectionpool.py”, line 11, in
from .exceptions import (
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\exceptions.py”, line 2, in
from .packages.six.moves.http_client import (
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 656, in _load_unlocked
File “”, line 626, in _load_backward_compatible
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\packages\six.py”, line 203, in load_module
mod = mod._resolve()
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\packages\six.py”, line 115, in _resolve
return _import_module(self.mod)
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\packages\six.py”, line 82, in _import_module
import(name)
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\http\client.py”, line 71, in
import email.parser
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\email\parser.py”, line 12, in
from email.feedparser import FeedParser, BytesFeedParser
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\email\feedparser.py”, line 27, in
from email._policybase import compat32
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\email_policybase.py”, line 9, in
from email.utils import _has_surrogates
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\email\utils.py”, line 33, in
from email.parseaddr import quote
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\email_parseaddr.py”, line 16, in
import time, calendar
File “C:\Users\aba\Desktop\plot.ly\d4\calendar.py”, line 2, in
import plotly.graph_objs as go
File "C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\graph_objs_init
.py", line 1, in
from ._violin import Violin
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\graph_objs_violin.py”, line 1, in
from plotly.basedatatypes import BaseTraceType
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\basedatatypes.py”, line 12, in
from plotly.offline.offline import get_jconfig
File "C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\offline_init
.py", line 6, in
from . offline import (
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\plotly\offline\offline.py”, line 16, in
from requests.compat import json as _json
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\compat.py”, line 58, in
from urllib.request import parse_http_list, getproxies, proxy_bypass, proxy_bypass_environment, getproxies_environment
File “C:\Users\aba\AppData\Local\Continuum\anaconda3\lib\urllib\request.py”, line 1350, in
if hasattr(http.client, ‘HTTPSConnection’):
AttributeError: module ‘http’ has no attribute ‘client’

I did the rookie mistake of naming a .py script with the same name as a module hence messing up everything. Do not name your app ‘calender.py’ it will only ruing your day…

4 Likes