You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/components/register.py", line 56, in sync_post_fn reply = reply_fn(copy.deepcopy(msgDict))
File "app.py", line 143, in img_reply file=itchatmp.messages.download(msg['MediaId'])
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/controllers/messages.py", line 38, in download
mediaId)
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/controllers/common.py", line 19, in determine_wrapper
**return mpFn(*args, kwargs)
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/controllers/mpapi/base/common.py", line 147, in __access_token
updateResult = tokenFn()
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/controllers/mpapi/base/common.py", line 80, in _update_access_token
r = ReturnValue(r)
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/returnvalues.py", line 30, in init Future.init(self)
File "/root/anaconda3/envs/itchatmp/lib/python3.5/asyncio/futures.py", line 169, in init
self._loop = events.get_event_loop()
File "/root/anaconda3/envs/itchatmp/lib/python3.5/asyncio/events.py", line 678, in get_event_loop
return get_event_loop_policy().get_event_loop()
File "/root/anaconda3/envs/itchatmp/lib/python3.5/asyncio/events.py", line 584, in get_event_loop
% threading.current_thread().name) RuntimeError: There is no current event loop in thread 'Thread-9'.
脚本里有
file=itchatmp.messages.download(msg['MediaId']),
收到图片时会发生下面的错误。
在 Python2.7 是没问题的,
出问题是在3.5.5。
有人知道解决方法吗
在附上我的 requirements.txt
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/components/register.py", line 56, in sync_post_fn
reply = reply_fn(copy.deepcopy(msgDict))
File "app.py", line 143, in img_reply
file=itchatmp.messages.download(msg['MediaId'])
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/controllers/messages.py", line 38, in download
mediaId)
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/controllers/common.py", line 19, in determine_wrapper
**return mpFn(*args, kwargs)
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/controllers/mpapi/base/common.py", line 147, in __access_token
updateResult = tokenFn()
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/controllers/mpapi/base/common.py", line 80, in _update_access_token
r = ReturnValue(r)
File "/root/anaconda3/envs/itchatmp/lib/python3.5/site-packages/itchatmp/returnvalues.py", line 30, in init
Future.init(self)
File "/root/anaconda3/envs/itchatmp/lib/python3.5/asyncio/futures.py", line 169, in init
self._loop = events.get_event_loop()
File "/root/anaconda3/envs/itchatmp/lib/python3.5/asyncio/events.py", line 678, in get_event_loop
return get_event_loop_policy().get_event_loop()
File "/root/anaconda3/envs/itchatmp/lib/python3.5/asyncio/events.py", line 584, in get_event_loop
% threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-9'.
asn1crypto==0.24.0
certifi==2018.4.16
cffi==1.11.5
chardet==3.0.4
cryptography==2.2.2
future==0.16.0
futures==3.1.1
idna==2.6
itchatmp==0.0.17
Pillow==5.1.0
pycparser==2.18
pylibmc==1.5.2
PyMySQL==0.8.0
python-memcached==1.59
pyzbar==0.1.5
requests==2.18.4
six==1.11.0
tornado==5.0.2
urllib3==1.22
$ pip install itchatmp
Requirement already satisfied: itchatmp in /python3.5/site-packages (0.0.17)
Requirement already satisfied: futures in /python3.5/site-packages (from itchatmp) (3.1.1)
Requirement already satisfied: tornado in /python3.5/site-packages (from itchatmp) (5.0.2)
Requirement already satisfied: cryptography in /python3.5/site-packages (from itchatmp) (2.2.2)
Requirement already satisfied: requests in /python3.5/site-packages (from itchatmp) (2.18.4)
Requirement already satisfied: six>=1.4.1 in /python3.5/site-packages (from cryptography->itchatmp) (1.11.0)
Requirement already satisfied: asn1crypto>=0.21.0 in /python3.5/site-packages (from cryptography->itchatmp) (0.24.0)
Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in /python3.5/site-packages (from cryptography->itchatmp) (1.11.5)
Requirement already satisfied: idna>=2.1 in /python3.5/site-packages (from cryptography->itchatmp) (2.6)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /python3.5/site-packages (from requests->itchatmp) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /python3.5/site-packages (from requests->itchatmp) (2018.4.16)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /python3.5/site-packages (from requests->itchatmp) (1.22)
Requirement already satisfied: pycparser in /python3.5/site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->itchatmp) (2.18)
The text was updated successfully, but these errors were encountered: