Closed akhilpo closed 9 years ago
It looks like you are using the 1.0 release, right?
That error means that the connection was cut. Looking at the Facebook XMPP group, it appears that Facebook is having issues with dropping clients today, which would be the cause of this issue.
If you use the develop branch, this error is handled properly (it is caught and handled in 1.0, it just also logs the exception trace).
thanks..
I updated the package to the develop version and hit with another issue.
Traceback (most recent call last):
File "D:\Work folder\Python\sleekxmppyproj32.py", line 32, in <module>
chatbot.connect(addr)
File "C:\Python32\lib\site-packages\sleekxmpp\clientxmpp.py", line 154, in connect
reattempt=reattempt)
File "C:\Python32\lib\site-packages\sleekxmpp\xmlstream\xmlstream.py", line 417, in connect
func=self._connect, args=(reattempt,))
File "C:\Python32\lib\site-packages\sleekxmpp\thirdparty\statemachine.py", line 69, in transition
func=func, args=args, kwargs=kwargs)
File "C:\Python32\lib\site-packages\sleekxmpp\thirdparty\statemachine.py", line 107, in transition_any
return_val = func(*args,**kwargs) if func is not None else True
File "C:\Python32\lib\site-packages\sleekxmpp\xmlstream\xmlstream.py", line 454, in _connect
self.address[1])
File "C:\Python32\lib\site-packages\sleekxmpp\xmlstream\xmlstream.py", line 947, in pick_dns_answer
return next(self.dns_answers)
File "C:\Python32\lib\site-packages\sleekxmpp\xmlstream\resolver.py", line 96, in resolve
ipv4 = socket.inet_pton(socket.AF_INET, host)
AttributeError: 'module' object has no attribute 'inet_pton'
Now it doesnt even connect.. :(
Reverted back to Master (v1.0) and it works fine. At least it connects and runs now.
Is that "socket..inet_pton()" supposed to be "socket.inet_aton()"?? :/ just a wild guess....
Ah, Windows. Looks like its socket module doesn't have inet_pton. One sec and I'll patch things to now use that method unless its available.
Ok, develop is updated to not use inet_pton unless its available. This may mean that specifying an IPv6 literal as the server name on a Windows machine may potentially behave oddly.
Is that "socket..inet_pton()" supposed to be "socket.inet_aton()"?? :/
socket.inet_aton only handles IPv4 literals. To handle IPv4 and IPv6 requires inet_pton.
Is there any better solution that handles both? I will try the new one.
@0xakhil I'm going to mark this as closed - the issue and version are old enough that if this is still happening it would be saner to have a new issue after seeing if it exists in the latest SleekXMPP
When running as a client for facebook get, I am getting the following error occationally:
What's wrong here??
My code: