سلام
بنده باتی نوشتم که به درستی کار میکنه ولی وقتی توی سرور آپلود کردم بعد از یک مدت طولانی به اکسپشن میخوره ، دراین مدت هیچ پیغامی از طرف کاربران به بات ارسال نمیشه، یعنی مثلا بعد از یک روز یا یه زمان طولانی که بات بدون فعالیت میمونه...
اکسپشن بصورت زیره:
2018-10-04 11:02:00,877 dispatcher.py:72 ERROR:
"the JSON object must be str, not 'EofStream'"
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/balebot/dispatcher.py", line 68, in run
update_message_json = json_handler.loads(update_message_data)
File "/usr/lib/python3.5/json/init.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'EofStream'
2018-10-04 11:02:01,309 network.py:44 DEBUG:
"reconnect: wss://api.bale.ai/v1/bots/4a21e845cd6f38aac606e4cc719b770b9cedee5f"
2018-10-04 11:18:53,788 network.py:70 DEBUG:
"[transport] receiving : WSMessage(type=<WSMsgType.ERROR: 258>, data=EofStream(), extra=None)"
2018-10-04 11:18:53,789 dispatcher.py:72 ERROR:
"the JSON object must be str, not 'EofStream'"
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/balebot/dispatcher.py", line 68, in run
update_message_json = json_handler.loads(update_message_data)
File "/usr/lib/python3.5/json/init.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'EofStream'
2018-10-04 11:18:54,216 network.py:44 DEBUG:
"reconnect: wss://api.bale.ai/v1/bots/4a21e845cd6f38aac606e4cc719b770b9cedee5f"
^C2018-10-10 10:49:27,532 network.py:104 WARNING:
"network stopped working."
Traceback (most recent call last):
File "main.py", line 4, in
invoke()
File "/root/python_Bale/Controller/Controller.py", line 38, in invoke
updater.run()
File "/usr/local/lib/python3.5/dist-packages/balebot/updater.py", line 39, in run
self._loop.run_forever()
File "/usr/lib/python3.5/asyncio/base_events.py", line 345, in run_forever
self._run_once()
File "/usr/lib/python3.5/asyncio/base_events.py", line 1276, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3.5/selectors.py", line 441, in select
بنظر میاد که این اکسپشن بخاطر خود کتابخانه ی بله باشه.
مشخصات :
Ubuntu 16.04 LTS
python 3.5
راه حلی دارید؟
سلام
بنده باتی نوشتم که به درستی کار میکنه ولی وقتی توی سرور آپلود کردم بعد از یک مدت طولانی به اکسپشن میخوره ، دراین مدت هیچ پیغامی از طرف کاربران به بات ارسال نمیشه، یعنی مثلا بعد از یک روز یا یه زمان طولانی که بات بدون فعالیت میمونه...
اکسپشن بصورت زیره:
2018-10-04 11:02:00,877 dispatcher.py:72 ERROR:
"the JSON object must be str, not 'EofStream'"
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/balebot/dispatcher.py", line 68, in run
update_message_json = json_handler.loads(update_message_data)
File "/usr/lib/python3.5/json/init.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'EofStream'
2018-10-04 11:02:01,309 network.py:44 DEBUG:
"reconnect: wss://api.bale.ai/v1/bots/4a21e845cd6f38aac606e4cc719b770b9cedee5f"
2018-10-04 11:18:53,788 network.py:70 DEBUG:
"[transport] receiving : WSMessage(type=<WSMsgType.ERROR: 258>, data=EofStream(), extra=None)"
2018-10-04 11:18:53,789 dispatcher.py:72 ERROR:
"the JSON object must be str, not 'EofStream'"
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/balebot/dispatcher.py", line 68, in run
update_message_json = json_handler.loads(update_message_data)
File "/usr/lib/python3.5/json/init.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'EofStream'
2018-10-04 11:18:54,216 network.py:44 DEBUG:
"reconnect: wss://api.bale.ai/v1/bots/4a21e845cd6f38aac606e4cc719b770b9cedee5f"
^C2018-10-10 10:49:27,532 network.py:104 WARNING:
"network stopped working."
Traceback (most recent call last):
File "main.py", line 4, in
invoke()
File "/root/python_Bale/Controller/Controller.py", line 38, in invoke
updater.run()
File "/usr/local/lib/python3.5/dist-packages/balebot/updater.py", line 39, in run
self._loop.run_forever()
File "/usr/lib/python3.5/asyncio/base_events.py", line 345, in run_forever
self._run_once()
File "/usr/lib/python3.5/asyncio/base_events.py", line 1276, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3.5/selectors.py", line 441, in select
بنظر میاد که این اکسپشن بخاطر خود کتابخانه ی بله باشه.
مشخصات :
Ubuntu 16.04 LTS
python 3.5
راه حلی دارید؟