KittyCAD/kittycad.py

to_dict() errors for mass and volume classes

Closed this issue · 2 comments

fv: FileVolume = create_file_volume.sync(
        client=client,
        body=content,
        src_format=FileSourceFormat.OBJ)

fv.to_dict()

Errors with

Traceback (most recent call last):
  File "/Users/kurthutten/kittycad/litterbox/tutorials/get_mass/get_mass.py", line 26, in <module>
    fm.to_dict()
  File "/Users/kurthutten/kittycad/litterbox/my_env/lib/python3.9/site-packages/kittycad/models/file_mass.py", line 42, in to_dict
    id = self.id.value
AttributeError: 'Uuid' object has no attribute 'value'

Same thing for mass, and maybe others?

I created the branch to_dict_failing_tests_issue_26
and this draft PR to run our workflows to show the tests failing with to_dict
Logs here

i fixed it and cherrypicked your commit w the test thanks! let me know if you see anything else