satanas / Turpial

Twitter client written in Python. Light, fast, fully functional and integrated to the user desktop
http://turpial.org.ve
GNU General Public License v3.0
174 stars 47 forks source link

Cannot register an account over IPv6 #343

Closed WhyNotHugo closed 10 years ago

WhyNotHugo commented 10 years ago

I tried adding an account to turpial, but I'm getting the below error.

$ turpial 
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
DEBUG::Using gst as sound system
/usr/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:127: RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK
  set_interactive(1)
libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.twitter.com
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.twitter.com
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/turpial/ui/qt/accounts.py", line 161, in __register_twitter_account
    account.authorize_oauth_access(pin)
  File "/usr/lib/python2.7/site-packages/libturpial/api/models/account.py", line 173, in authorize_oauth_access
    self.profile = self.protocol.authorize_token(pin)
  File "/usr/lib/python2.7/site-packages/libturpial/lib/protocols/twitter/twitter.py", line 111, in authorize_token
    return self.verify_credentials()
  File "/usr/lib/python2.7/site-packages/libturpial/lib/protocols/twitter/twitter.py", line 124, in verify_credentials
    rtn = self.http.get('/account/verify_credentials', secure=True)
  File "/usr/lib/python2.7/site-packages/libturpial/lib/http.py", line 181, in get
    id_in_url)
  File "/usr/lib/python2.7/site-packages/libturpial/lib/http.py", line 210, in request
    self.__validate_ssl_cert(base_url)
  File "/usr/lib/python2.7/site-packages/libturpial/lib/http.py", line 83, in __validate_ssl_cert
    sock.connect((ip, port))
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
gaierror: [Errno -9] Address family for hostname not supported

<class 'socket.gaierror'>: [Errno -9] Address family for hostname not supported

I'm assuming this is related to my network only having IPv6 and not any IPv4 addresses or routes (though the gateway does imlpement NAT64 for IPv4-only hosts).

Bouska commented 10 years ago

There is a PR in libturpial that fixes this https://github.com/satanas/libturpial/pull/96

WhyNotHugo commented 10 years ago

@Bouska It would seem so. I belive we can close this issue; I'll keep an eye on libturpial#96 which should fix this.

satanas commented 10 years ago

I'll be merging that PR for the next stable release. Thanks for your contribution