Comments (8)
Fix is written here : #77
from fbchat.
I just get this error
Traceback (most recent call last):
File "/opt/pycharm-com-eap/helpers/pydev/pydevd.py", line 1581, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/opt/pycharm-com-eap/helpers/pydev/pydevd.py", line 964, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/daniel/Dropbox/Code/Python/TesFBChat.py", line 19, in <module>
bot.listen()
File "/home/daniel/.local/lib/python2.7/site-packages/fbchat/client.py", line 544, in listen
sticky, pool = self._getSticky()
File "/home/daniel/.local/lib/python2.7/site-packages/fbchat/client.py", line 468, in _getSticky
j = get_json(r.text)
File "/home/daniel/.local/lib/python2.7/site-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 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
from fbchat.
I have the same issue
from fbchat.
I'm getting a similar but slightly different error.
>>> c = fbchat.Client('EMAIL', 'PASSWORD')
Logging in...
login successful
>>> c.listen()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/fbchat/client.py", line 544, in listen
sticky, pool = self._getSticky()
File "/usr/local/lib/python3.5/dist-packages/fbchat/client.py", line 468, in _getSticky
j = get_json(r.text)
File "/usr/local/lib/python3.5/dist-packages/fbchat/utils.py", line 18, in get_json
return json.loads(re.sub(r"^[^{]*", '', text, 1))
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
from fbchat.
Thanks @Zulex, it seems to fix the bug. I hope it will be merged soon.
from fbchat.
Getting the same error as @dstelzer , and @Zulex , the fix you specified does not help either.
Here's the detailed traceback:
JSONDecodeError Traceback (most recent call last)
<ipython-input-116-c759cb92fbd3> in <module>()
----> 1 bot.listen()
/Users/tshrjn/anaconda3/lib/python3.5/site-packages/fbchat/client.py in listen(self, markAlive)
542 # ex_type, ex, tb = sys.exc_info()
543 self.on_message_error(sys.exc_info(), m)
--> 544
545
546 def listen(self, markAlive=True):
/Users/tshrjn/anaconda3/lib/python3.5/site-packages/fbchat/client.py in _getSticky(self)
466 "msgs_recv": 0,
467 "channel": self.user_channel,
--> 468 "clientid": self.client_id
469 }
470
/Users/tshrjn/anaconda3/lib/python3.5/site-packages/fbchat/utils.py in get_json(text)
16
17 def get_json(text):
---> 18 return json.loads(re.sub(r"^[^{]*", '', text, 1))
19
20 def digit_to_char(digit):
/Users/tshrjn/anaconda3/lib/python3.5/json/__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
317 parse_int is None and parse_float is None and
318 parse_constant is None and object_pairs_hook is None and not kw):
--> 319 return _default_decoder.decode(s)
320 if cls is None:
321 cls = JSONDecoder
/Users/tshrjn/anaconda3/lib/python3.5/json/decoder.py in decode(self, s, _w)
337
338 """
--> 339 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
340 end = _w(s, end).end()
341 if end != len(s):
/Users/tshrjn/anaconda3/lib/python3.5/json/decoder.py in raw_decode(self, s, idx)
355 obj, end = self.scan_once(s, idx)
356 except StopIteration as err:
--> 357 raise JSONDecodeError("Expecting value", s, err.value) from None
358 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
from fbchat.
from fbchat.
Merged #77
from fbchat.
Related Issues (20)
- File loading progress
- Can't listen() Error #1357005 HOT 3
- Login not work
- FBchatException solution HOT 1
- Could not find fb_dtsg
- Could not find any ServerJSDefine. Please report this, along with the data below HOT 1
- Note for others unable to login HOT 4
- Failed parsing MQTT data on /t_trace as JSON HOT 3
- Sending AudioAttachments doesn't work HOT 4
- Trouble Logging in Error and info included
- Can't Log in HOT 7
- Search contact by mobile phone number
- Module not found Error!
- Error when sending request: Got 500 response.
- Closed
- Screenshot (Mar 25, 2023 6:10:08 AM)
- how can it get all feeds and comments
- GraphQL error #3252001: Rate limit exceeded / None HOT 3
- Sendlocalfile isn't working
- Is fbchat dead? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fbchat.