Calling arguments by position causes confusing errors

Description

In R you can call arguments by both name and position, but synapser doesn't support this. I would expect the two commands below to do the same thing:

1 2 synGet("syn17101430", 2) synGet("syn17101430", version = 2)

But the first one errors with Error in value[[3L]](cond) : get() takes 2 positional arguments but 3 were given. The results are even more confusing with some other functions like synGetChildren():

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 dat <- synGetChildren("syn17068284", list("files")) as.list(dat) #> Traceback (most recent call last): #> #> File "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/synapser/python/gateway.py", line 25, in asList #> #> #> return list(self._inner) #> File "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/synapser/lib/python3.5/site-packages/synapseclient-1.9.2-py3.5.egg/synapseclient/client.py", line 1423, in getChildren #> #> #> entityChildrenResponse = self.restPOST('/entity/children', body=json.dumps(entityChildrenRequest)) #> File "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/synapser/lib/python3.5/site-packages/synapseclient-1.9.2-py3.5.egg/synapseclient/client.py", line 3347, in restPOST #> #> #> exceptions._raise_for_status(response, verbose=self.debug) #> File "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/synapser/lib/python3.5/site-packages/synapseclient-1.9.2-py3.5.egg/synapseclient/exceptions.py", line 153, in _raise_for_status #> #> #> raise SynapseHTTPError(message, response=response) #> synapseclient.exceptions #> . #> SynapseHTTPError #> : #> 400 Client Error: #> java.lang.IllegalArgumentException: No enum constant org.sagebionetworks.repo.model.EntityType.files; nested exception is org.sagebionetworks.schema.adapter.JSONObjectAdapterException: java.lang.IllegalArgumentException: No enum constant org.sagebionetworks.repo.model.EntityType.files #> Error in pyCall("__R__.namespace[14].asList", args = xargs, kwargs = xkwargs): error occurred while calling '__R__.namespace[14].asList'

Environment

None

Status

Assignee

Unassigned

Reporter

Kara Woo

Labels

None

Validator

None

Release Version History

None

Priority

Major
Configure