-
Notifications
You must be signed in to change notification settings - Fork 153
Closed
Labels
Description
This error is intermittent and it seems it pops up when the file was not successfully attached to the message by the webex teams backend. I can't reproduce it consistently, but I encountered this problem already twice.
File ".../.venv/lib/python3.6/site-packages/webexteamssdk/api/messages.py", line 210, in create
data=multipart_data)
File ".../.venv/lib/python3.6/site-packages/webexteamssdk/restsession.py", line 393, in post
**kwargs)
File ".../.venv/lib/python3.6/site-packages/webexteamssdk/restsession.py", line 250, in request
check_response_code(response, erc)
File ".../.venv/lib/python3.6/site-packages/webexteamssdk/utils.py", line 217, in check_response_code
raise ApiError(response)
File ".../.venv/lib/python3.6/site-packages/webexteamssdk/exceptions.py", line 152, in __init__
detail = _response_to_string(response)
File ".../.venv/lib/python3.6/site-packages/webexteamssdk/exceptions.py", line 91, in _response_to_string
if request.body else "")
File ".../.venv/lib/python3.6/site-packages/webexteamssdk/exceptions.py", line 45, in _to_unicode
assert isinstance(string, basestring)
AssertionError
I was sending a message using
api.messages.create(roomId="id", markdown="text", files=["path/to/file1"])