Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

TypeError while joining irc #153

Open
reinefjord opened this issue Feb 26, 2016 · 3 comments
Open

TypeError while joining irc #153

reinefjord opened this issue Feb 26, 2016 · 3 comments

Comments

@reinefjord
Copy link

The server produces an exception while trying to join irc:

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/site-packages/electrumserver/ircthread.py", line 164, in run
    c = client.server().connect('irc.freenode.net', 6697, self.nick, self.password, ircname=self.ircname, connect_factory=ssl_factory)
  File "/usr/lib/python2.7/site-packages/irc/functools.py", line 35, in wrapper
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/irc/client.py", line 498, in connect
    self.socket = self.connect_factory(self.server_address)
  File "/usr/lib/python2.7/site-packages/irc/connection.py", line 55, in connect
    sock.bind(self.bind_address)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
TypeError: getsockaddrarg: AF_INET address must be tuple, not NoneType
@EagleTM
Copy link

EagleTM commented Feb 28, 2016

Which version of the python IRC module are you running?
The current code works fine here with 14.0, maybe you have an earlier version which doesn't default to bind_address=None

Can you also try to set irc_bind_ip = in your electrum.conf for the server and see if that helps here?

In case earlier versions of the IRC module don't handle the None type we could work around by conditionally avoiding bind_address if bind_address is empty in ircthread.py:
ssl_factory = irc.connection.Factory(wrapper=ssl.wrap_socket, bind_address=bind_address)

@reinefjord
Copy link
Author

I'm using python irc version 11.0.1. Setting irc_bind_ip works.

@EagleTM
Copy link

EagleTM commented Mar 5, 2016

Commit got reverted, needs re-writing to be compatible with irc < v14

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants