bbc / RadioVisDemo

RadioDNS and RadioVIS Slideshow Protocol Demo
https://www.bbc.co.uk/rd/projects/radiovis
Apache License 2.0
27 stars 12 forks source link

Problem starting RadioVisDemo on some networks #10

Open njh opened 7 years ago

njh commented 7 years ago

I am on a train (❗️) and can't get radiovis_demo.py to start on the network: (I have seen this fail on other networks too)

Traceback (most recent call last):
  File "radiovis_demo.py", line 27, in <module>
    from lib.connection_manager import ConnectionManager
  File "/Users/humfrn01/Projects/RadioVisDemo/lib/connection_manager.py", line 23, in <module>
    from radiovis_client import RadioVisClient
  File "/Users/humfrn01/Projects/RadioVisDemo/lib/radiovis_client.py", line 15, in <module>
    import stomp
  File "/Users/humfrn01/Projects/RadioVisDemo/lib/stomp.py", line 245, in <module>
    class Connection(object):
  File "/Users/humfrn01/Projects/RadioVisDemo/lib/stomp.py", line 477, in Connection
    socket.gethostbyname(socket.gethostname()),
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

It seems to be related to this:

    __localhost_names = [ "localhost",
                          "127.0.0.1",
                          socket.gethostbyname(socket.gethostname()),
                          socket.gethostname(),
                          socket.getfqdn(socket.gethostname()) ]

One of the calls is failing but the exception isn't being caught.

Not quite sure why it needs a local hostname at all...

chrisn commented 7 years ago

This is in the third-party STOMP library I used. I suggest we update to use the latest version: https://github.com/jasonrbriggs/stomp.py.

njh commented 7 years ago

Hm, it is failing on Interwebs today.

It looks like stomp.py has evolved to being a lot more than a single file - so might be non-trivial to swap in the new version 😟