We're updating the issue view to help you get more done. 

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

Status

Assignee

Kimyen Truong

Reporter

Andrew Lamb

Labels

None

Validator

Thomas Yu

Release Version History

None

Sprint

None

Fix versions

Affects versions

py-1.9.2

Priority

Critical