liuwons / liuwons/wxBot

运行过程中出现错误

Open
#131 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

systems:ubuntu14.04LTS
python: python2.7

[MSG] 80B雪儿:
[Text] [尴尬]
ROBOT: 啊喔,怎么了?
[ERROR] Except in proc_msg
Traceback (most recent call last):
File "/home/wlp2s0/wxBot-master/wxbot.py", line 618, in proc_msg
self.handle_msg(r)
File "/home/wlp2s0/wxBot-master/wxbot.py", line 594, in handle_msg
self.handle_msg_all(message)
File "bot.py", line 69, in handle_msg_all
self.send_msg_by_uid(self.tuling_auto_reply(msg['user']['id'], msg['content']['data']), msg['user']['id'])
File "/home/wlp2s0/wxBot-master/wxbot.py", line 792, in send_msg_by_uid
dic = r.json()
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 826, in json
return complexjson.loads(self.text, **kwargs)
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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in wxbot.py at send_msg_by_uid on line 792 and trace the response from the message-handling path shown in the traceback. Reproduce the failure with the reported message and inspect why the response cannot be decoded as JSON. Done means this scenario no longer raises ValueError during message processing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.