'>' not supported between instances of 'float' and 'NoneType'
See original GitHub issueBug Description I recently did a general upgrade to python 3.7 and latest visdom, and several console output issues appeared.
The worst culprit is the following showing in output every few seconds:
'>' not supported between instances of 'float' and 'NoneType'
This issue does not show up in commit ec91e738e100a9cbf946c332c7783ffd12c644b5 but is present in commit 17f28cb258ad874d6fc5fcce5a4479abe4377738
To be clear: everything functions correctly, but when training in pytorch, output info is drowned out by the error:
'>' not supported between instances of 'float' and 'NoneType' │INFO:root:Opened visdom socket from ip: ::1
'>' not supported between instances of 'float' and 'NoneType' │INFO:tornado.access:101 GET /vis_socket (::1) 0.64ms
'>' not supported between instances of 'float' and 'NoneType' │INFO:root:Opened visdom socket from ip: ::1
'>' not supported between instances of 'float' and 'NoneType' │INFO:tornado.access:200 POST /win_exists (::1) 0.69ms
basic1 epoch: 62 loss: 2772.736160993576 │INFO:tornado.access:200 POST /update (::1) 0.59ms
'>' not supported between instances of 'float' and 'NoneType' │INFO:tornado.access:101 GET /vis_socket (::1) 0.53ms
'>' not supported between instances of 'float' and 'NoneType' │INFO:root:Opened visdom socket from ip: ::1
Reproduction Steps
I have reproduced the error on two separate machines, one using anaconda with python 3.7 on ubuntu 16.04, another using system python 3.7 on arch linux. I have tried visdom from pip, and master
. Both show the same issue.
Python 3.7.0 (default, Jul 15 2018, 10:44:58)
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import visdom
>>> vis = visdom.Visdom()
'>' not supported between instances of 'float' and 'NoneType'
'>' not supported between instances of 'float' and 'NoneType'
'>' not supported between instances of 'float' and 'NoneType'
Visdom python client failed to establish socket to get messages from the server. This feature is optional and can be disabled by initializing Visdom with `use_incoming_socket=False`, which will prevent waiting for this request to timeout.
>>> '>' not supported between instances of 'float' and 'NoneType'
'>' not supported between instances of 'float' and 'NoneType'
'>' not supported between instances of 'float' and 'NoneType'
'>' not supported between instances of 'float' and 'NoneType'
'>' not supported between instances of 'float' and 'NoneType'
'>' not supported between instances of 'float' and 'NoneType'
'>' not supported between instances of 'float' and 'NoneType'
Expected behavior I would expect the messages not to appear.
Server logs:
Each time the >
message appears in console, a GET /vis_socket
request happens. The deprecation notice is also present on both machines, although I don’t think that’s relevant here.
$ python -m visdom.server
visdom/py/visdom/server.py:30: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
ioloop.install() # Needs to happen before any tornado imports!
Downloading scripts. It might take a while.
It's Alive!
INFO:root:Application Started
You can navigate to http://localhost:8097
INFO:tornado.access:200 POST /env/main (::1) 0.92ms
INFO:tornado.access:101 GET /vis_socket (::1) 0.51ms
INFO:root:Opened visdom socket from ip: ::1
INFO:tornado.access:101 GET /vis_socket (::1) 0.74ms
INFO:root:Opened visdom socket from ip: ::1
INFO:tornado.access:101 GET /vis_socket (::1) 0.69ms
INFO:root:Opened visdom socket from ip: ::1
INFO:tornado.access:101 GET /vis_socket (::1) 0.70ms
INFO:root:Opened visdom socket from ip: ::1
INFO:tornado.access:101 GET /vis_socket (::1) 0.71ms
INFO:root:Opened visdom socket from ip: ::1
INFO:tornado.access:101 GET /vis_socket (::1) 0.97ms
INFO:root:Opened visdom socket from ip: ::1
Additional context Everything is standard, happens with basic vanilla install on python 3.7.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
I see this happening in visdom 0.1.8.5 but not in visdom 0.1.8.4.
Edit: just read about logging.
It’s currently being caused by a bug in one of visdom’s dependancies. You can either download an earlier version of websocket-client or install visdom from source until https://github.com/websocket-client/websocket-client/issues/466 is fixed.
Edit: I opened a PR in their repo with a fix, hopefully they pull it soon.