question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection timed out : when using python -m visdom.server

See original GitHub issue

Hi, when I use python -m visdom.server to start visdom server, I got Connection timed out error as following: `Traceback (most recent call last): File “/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py”, line 1318, in do_open encode_chunked=req.has_header(‘Transfer-encoding’)) File “/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py”, line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File “/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py”, line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File “/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py”, line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File “/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py”, line 1026, in _send_output self.send(msg) File “/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py”, line 964, in send self.connect() File “/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py”, line 1392, in connect super().connect() File “/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py”, line 936, in connect (self.host,self.port), self.timeout, self.source_address) File “/root/anaconda2/envs/gtn_env/lib/python3.6/socket.py”, line 722, in create_connection raise err File “/root/anaconda2/envs/gtn_env/lib/python3.6/socket.py”, line 713, in create_connection sock.connect(sa) TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/root/anaconda2/envs/gtn_env/lib/python3.6/site-packages/visdom/server.py”, line 615, in download_scripts data = opener.open(req).read() File “/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py”, line 526, in open response = self._open(req, data) File “/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py”, line 544, in _open ‘_open’, req) File “/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py”, line 504, in _call_chain result = func(*args) File “/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py”, line 1361, in https_open context=self._context, check_hostname=self._check_hostname) File “/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py”, line 1320, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/root/anaconda2/envs/gtn_env/lib/python3.6/runpy.py”, line 193, in _run_module_as_main “main”, mod_spec) File “/root/anaconda2/envs/gtn_env/lib/python3.6/runpy.py”, line 85, in _run_code exec(code, run_globals) File “/root/anaconda2/envs/gtn_env/lib/python3.6/site-packages/visdom/server.py”, line 636, in <module> download_scripts() File “/root/anaconda2/envs/gtn_env/lib/python3.6/site-packages/visdom/server.py”, line 619, in download_scripts logging.error(‘Error {} while downloading {}’.format(exc.code, key)) AttributeError: ‘URLError’ object has no attribute ‘code’ ` I am a new one for pytorch and visdom. I would like to use visdom for visualization. I use anaconda2, python3.6 as default setting. What should I do? Thanks a lot !

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
JackUrbcommented, Oct 30, 2017

Correct, then try to start the server again and see if it makes it to running. In general as you run into problems with CDNs, the order that visdom downloads and saves files is as follows:

download from https://unpkg.com/jquery@3.1.1/dist/jquery.min.js 
   and put at visdom/static/js/jquery.min.js
download from https://unpkg.com/bootstrap@3.3.7/dist/js/bootstrap.min.js 
   and put at visdom/static/js/bootstrap.min.js
download from https://unpkg.com/react-resizable@1.4.6/css/styles.css 
   and put at visdom/static/css/react-resizable-styles.css
download from https://unpkg.com/react-grid-layout@0.14.0/css/styles.css
   and put at visdom/static/css/react-grid-layout-styles.css
download from https://unpkg.com/react@15.6.1/dist/react.min.js
   and put at visdom/static/js/react-react.min.js
download from https://unpkg.com/react-dom@15.6.1/dist/react-dom.min.js 
   and put at visdom/static/js/react-dom.min.js
download from https://unpkg.com/classnames@2.2.5 
   and put at visdom/static/fonts/classnames
download from https://unpkg.com/layout-bin-packer@1.2.2 
   and put at visdom/static/fonts/layout_bin_packer
download from https://cdn.rawgit.com/STRML/react-grid-layout/0.14.0/dist/react-grid-layout.min.js 
   and put at visdom/static/js/react-grid-layout.min.js
download from https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_SVG 
   and put at visdom/static/js/mathjax-MathJax.js
download from https://cdn.rawgit.com/plotly/plotly.js/master/dist/plotly.min.js 
   and put at visdom/static/js/plotly-plotly.min.js
download from https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css 
   and put at visdom/static/css/bootstrap.min.css
download from https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.eot 
   and put at visdom/static/fonts/glyphicons-halflings-regular.eot
download from https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.eot?#iefix 
   and put at visdom/static/fonts/glyphicons-halflings-regular.eot?#iefix
download from https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.woff2 
   and put at visdom/static/fonts/glyphicons-halflings-regular.woff2
download from https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.woff 
   and put at visdom/static/fonts/glyphicons-halflings-regular.woff
download from https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.ttf 
   and put at visdom/static/fonts/glyphicons-halflings-regular.ttf
download from https://unpkg.com/bootstrap@3.3.7/dist/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular 
   and put at visdom/static/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular

If you run the server and it hangs on downloading, you can download the next missing file yourself (based on the last file in the list you can confirm having)

1reaction
ksnzhcommented, Nov 1, 2017

@JackUrb Yes, it’s a js file. And following your instructions, I solved this problem. Thank you very much.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connection timed out : when using python -m visdom.server
Hi, when I use python -m visdom.server to start visdom server, I got Connection timed out error as following:
Read more >
which part of the code is giving connection refused error?
This is related to Visdom. You could run the Visdom server in the background to make this error go away by running python...
Read more >
Has anyone used Visdom on Google Collab?[project]
I'm getting an error saying connection timed out, and as a result another error saying Visdom python client failed to establish socket to ......
Read more >
swapae/util/visualizer.py · sunshineatnoon/TextureScraping at ...
We're on a journey to advance and democratize artificial intelligence through ... False if self.display_id > 0: # connect to a visdom server...
Read more >
分类专栏
解决visdom的启动问题visdom [Errno 110] Connection timed out while downloading https://cdn.plot.ly/plotly-l.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found