I am following through the examples on GitHub, but I am getting a strange error when I try to fetch a single object using the example in the README. I know the objects are there, because I have viewed them with the SpeckleViewer:
streamId = 'QSGAnXVef'
stream = client.streams.get(streamId)
# Fetch a single object using its placeholder ID
object = client.objects.get(stream.objects[0].id)
TypeError: dict() got an unexpected keyword argument 'skip_defaults'
During handling of the above exception, another exception occurred:
ErrorDuringImport Traceback (most recent call last)
<ipython-input-36-6b5ca7cc4009> in <module>
3
4 # Fetch a single object using its placeholder ID
----> 5 object = client.objects.get(stream.objects[0].id)
6
7 # Fetch the objects all at once using an optional query dict
# [...]
ErrorDuringImport: problem in speckle.schemas - TypeError: dict() got an unexpected keyword argument 'skip_defaults'
Any idea what is going on here?
PS. There are a also couple of script errors (I think, 'cause Python complains about them…):
# Fetch the objects all at once using an optional query dict
# [**the value for 'omit' should be a list, I assume**]
objects = client.objects.get_bulk([o.id for o in stream.objects], {'omit':['base64','displayValue']})
# Print out some object info
# [**note that closing parenthesis is missing in example**]
for o in objects:
print("Object {} is type {}".format(o.id, o.type))