Visdom: HTTPConnectionPool for python

Created on 17 Mar 2017  路  12Comments  路  Source: fossasia/visdom

When I try

import visdom
import numpy as np
vis = visdom.Visdom()
vis.text('Hello, world!')
vis.image(np.ones((10, 10, 3)))

I got this:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/visdom/__init__.py", line 170, in _send
    data=msg
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 110, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /events (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fa5b40f3690>: Failed to establish a new connection: [Errno 111] Connection refused',))

Actually the first time I launched the web successfully. But after that it cannot work anymore even I restart the computer.

Most helpful comment

Sorry... Forget to start the server....

All 12 comments

Sorry... Forget to start the server....

Thank you! I'm new here. And didn't realize to start the server.

I received the same error. I run python -m visdom.server in my terminal in ipython but I received invalid syntax error..
should I run this command somewhere else?

image

Thanks

You should run the python -m visdom.server command from your terminal, not in the python REPL. Make sure the server is running, so start in it a separate terminal window (potentially using screen or tmux)

I started the server using python -m visdom.server -p 7777 and was able to open it in the browser,
image
image

but when trying

import visdom, numpy as np
vis = visdom.Visdom()
vis.text('hello')

I get the following error:
image
image

please help

You should make your client connect to the correct port: vis = visdom.Visdom(port=7777).

Thanks,
also while running the demo script I get an error
image
is this attribute not available yet through pip (I installed visdom using pip)

Hi @udion - Yeah I haven't updated the pip package just yet, sorry! Doing so now

when I start the server.then it happens
image
I don't know what the "scripts" refers to ?

Every time the server runs it checks to see if it needs to download additional scripts for the frontend and then it does the downloads. This is normal behavior.

@JackUrb But my computer can't connect to the internet by school's config. In this situation,what should I do to make the server run properly

@zhaopanpan73 You can download the scripts elsewhere using the download.sh script, and then copy them over to the proper locations.

Was this page helpful?
0 / 5 - 0 ratings