benhoff / CHATIMUSMAXIMUS

Master chat GUI for Youtube, Twitch, Livecoding, and WatchPeopleCode
GNU General Public License v3.0
41 stars 14 forks source link

handle ZMQError, which happens if no connections are set up #33

Closed engelju closed 8 years ago

engelju commented 8 years ago

I wanted to check out the app without setting up all the connections. Prior to this fix, the following error occured:

Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "chatimusmaximus/__main__.py", line 81, in <module>
    main()
  File "chatimusmaximus/__main__.py", line 51, in main
    messager.subscribe_to_publishers(settings_data['sockets_to_connect_to'])
  File "/Users/julieengel/tmp/CHATIMUSMAXIMUS/chatimusmaximus/messaging.py", line 22, in subscribe_to_publishers
    self.sub_socket.connect(address)
  File "zmq/backend/cython/socket.pyx", line 514, in zmq.backend.cython.socket.Socket.connect (zmq/backend/cython/socket.c:5376)
zmq.error.ZMQError: Invalid argument

After this fix is applied, the GUI will show/open normally, of course without any connections active.

engelju commented 8 years ago

perhaps issue #30 could be related.

benhoff commented 8 years ago

Nice fix! Sorry it didn't work out of the box for you, but I'll get this wrapped in and merged probably later tonight

engelju commented 8 years ago

No problem, glad I could help! I am a big fan of your streams, they're really helpful.

benhoff commented 8 years ago

Thanks again for the patch!