listen() returning error
See original GitHub issueGetting the following error from the listen() function.
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "fb_chat.py", line 59, in handle_new_message
client.listen()
File "/usr/local/lib/python2.7/dist-packages/fbchat/client.py", line 517, in listen
sticky, pool = self._getSticky()
File "/usr/local/lib/python2.7/dist-packages/fbchat/client.py", line 442, in _getSticky
j = get_json(r.text)
File "/usr/local/lib/python2.7/dist-packages/fbchat/utils.py", line 18, in get_json
return json.loads(re.sub(r"^[^{]*", '', text, 1))
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
With the following lines,
print r
print '-----'
print r.text
I got this output
<Response [400]>
-----
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
Socket Programming: Error on listen() - visual c++
You can't use listen() on a datagram socket, thus the WSAEOPNOTSUPP error you are seeing: If no error occurs, listen returns zero.
Read more >listen() — Prepare the server for incoming client requests - IBM
The listen() call indicates a readiness to accept client connection requests. It transforms an active socket into a passive socket. Once called, socket...
Read more >listen
RETURN VALUE. Upon successful completions, listen() shall return 0; otherwise, -1 shall be returned and errno set to indicate the error.
Read more >listen(2) - Linux manual page - man7.org
RETURN VALUE top On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.
Read more >explain_listen(3): explain listen errors - Linux man page
The explain_errno_listen function is used to obtain an explanation of an error returned by the listen(2) system call. The least the message will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fix is written here : https://github.com/carpedm20/fbchat/pull/77
Merged #77