sendMessage() not working in python and R client

Description

>>> syn.sendMessage(["3360851"], "test", "test")

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/client.py", line 3284, in sendMessage

fileHandleId = multipart_upload_string(self, messageBody, contentType)

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/multipart_upload.py", line 263, in multipart_upload_string

**kwargs)

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/multipart_upload.py", line 341, in _multipart_upload

storageLocationId=storageLocationId, **kwargs)

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/multipart_upload.py", line 117, in _start_multipart_upload

endpoint=syn.fileHandleEndpoint))

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/client.py", line 3346, in restPOST

exceptions._raise_for_status(response, verbose=self.debug)

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/exceptions.py", line 153, in _raise_for_status

raise SynapseHTTPError(message, response=response)

synapseclient.exceptions.SynapseHTTPError: 400 Client Error:

Invalid Name: 'text/plain'. Names may only contain: letters, numbers, spaces, underscores, hypens, periods, plus signs, and parentheses

>>> syn.sendMessage(["3360851], "test", "test")

File "<stdin>", line 1

syn.sendMessage(["3360851], "test", "test")

^

SyntaxError: invalid syntax

>>> syn.sendMessage([3360851], "test", "test")

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/client.py", line 3284, in sendMessage

fileHandleId = multipart_upload_string(self, messageBody, contentType)

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/multipart_upload.py", line 263, in multipart_upload_string

**kwargs)

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/multipart_upload.py", line 341, in _multipart_upload

storageLocationId=storageLocationId, **kwargs)

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/multipart_upload.py", line 117, in _start_multipart_upload

endpoint=syn.fileHandleEndpoint))

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/client.py", line 3346, in restPOST

exceptions._raise_for_status(response, verbose=self.debug)

File "/home/aelamb/anaconda3/envs/py36/lib/python3.6/site-packages/synapseclient/exceptions.py", line 153, in _raise_for_status

raise SynapseHTTPError(message, response=response)

synapseclient.exceptions.SynapseHTTPError: 400 Client Error:

Invalid Name: 'text/plain'. Names may only contain: letters, numbers, spaces, underscores, hypens, periods, plus signs, and parentheses

Environment

Ubuntu 16 local Ubuntu 18 EC2

Activity

Show:
Thomas Yu
June 27, 2019, 11:09 PM

Sure. I will validate this by tomorrow

Thomas Yu
June 28, 2019, 7:43 PM
Edited

Looks good! Thanks. Looping and as they were running the minidream challenge and were heavily impacted. I provided them with the hot fix until the patch goes out.

 

Milen Nikolov
June 28, 2019, 7:47 PM

yes - the quick fix seems to work - thanks and everyone working on this - adrenaline levels were getting high amongst the miniDREAM challenge organizers.

Kimyen Truong
June 28, 2019, 7:49 PM

Great! I will deploy the patch to pypi now.

Kimyen Truong
June 28, 2019, 7:58 PM

Version 1.9.3 is available on pypi.

Assignee

Kimyen Truong

Reporter

Andrew Lamb

Labels

None

Validator

Thomas Yu

Development Area

None

Release Version History

None

Sprint

None

Fix versions

Affects versions

Priority

Critical
Configure