|
发表于 2017-8-21 23:21:21
|
显示全部楼层
本帖最后由 erj002 于 2017-8-21 23:24 编辑
请问大神,发送图片失败,报如下错误
2017-08-21 23:19:14 INFO (Thread-6) [wxpy.api.chats.chat] sending image to <Chat: 文件传输助手>:
/home/homeassistant/.homeassistant/www/123.jpg
2017-08-21 23:19:14 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
result = coro.throw(exc)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 1025, in _event_to_service_call
yield from service_handler.func(service_call)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify/__init__.py", line 138, in async_notify_message
yield from notify_service.async_send_message(**kwargs)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/notify/wechat.py", line 68, in send_message
self.bot.file_helper.send_image(image)
File "/srv/homeassistant/lib/python3.4/site-packages/wxpy/api/chats/chat.py", line 54, in wrapped
ret = do_send()
File "/srv/homeassistant/lib/python3.4/site-packages/wxpy/utils/misc.py", line 72, in wrapped
smart_map(check_response_body, ret)
File "/srv/homeassistant/lib/python3.4/site-packages/wxpy/utils/misc.py", line 207, in smart_map
return func(i, *args, **kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/wxpy/utils/misc.py", line 53, in check_response_body
raise ResponseError(err_code=err_code, err_msg=err_msg)
wxpy.exceptions.ResponseError: err_code: -1002; err_msg: 文件位置错误
发送图片失败,可以确定目录下存在此文件,
pi@hassbian:/home/homeassistant/.homeassistant/www $ ls -l
total 536
-rwxrwxrwx 1 root root 545000 Feb 20 2013 123.JPG
pi@hassbian:/home/homeassistant/.homeassistant/www $ |
|
|