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.

'>' not supported between instances of 'float' and 'NoneType'

See original GitHub issue

Bug 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:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
jramapuramcommented, Aug 21, 2018

I see this happening in visdom 0.1.8.5 but not in visdom 0.1.8.4.

Edit: just read about logging.

5reactions
JackUrbcommented, Aug 27, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: '>' not supported between instances of 'float' and ...
The error indicates that num (a float) is being compared to largest (a NoneType ). · Just a quick heads up, @tony19, that...
Read more >
'>' not supported between instances of 'NoneType' and float
The Python "TypeError: '>' not supported between instances of 'NoneType' and 'float'" occurs when we use a comparison operator between a None ...
Read more >
'' not supported between instances of 'NoneType' and 'float ...
Pandas : TypeError: '' not supported between instances of ' NoneType ' and ' float ' [ Beautify Your Computer ...
Read more >
PANDAS: recurring TypeError '<' not supported between ...
Sounds like a data issue, that somewhere somehow there's a comparison operation between a float value and a None.
Read more >
'>' not supported between instances of 'Nonetype' and 'float ...
That Worked. I am still getting this error "TypeError: '>' not supported between instances of 'NoneType' and 'float'".
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