Skip to content

KeyError: 'suppressed' #100

Open
Open
@JHPHELAN

Description

Recently installed OnShape-to-robot plus accessories on a Dell laptop / Ubuntu 22.04 successfully.
my config.json points with appropriate access and secret keys to MY COPY the JPL Open Source Rover:
https://cad.onshape.com/documents/5c358484057fc4c01d5e5803/w/bdf583acdf29d75695be5fbc/e/e3eb7193ecdec5b0a710978b
ubuntu@LinuxBox:~$ onshape-to-robot OnShape-OSR

* Checking OpenSCAD presence...
* Checking MeshLab presence...

* Retrieving workspace ID ...
+ Using workspace id: ec57fc1702d5177d685a86c9

* Retrieving elements in the document, searching for the assembly...
+ Found assembly, id: ccf42f743a831a145aea7c8a, name: "Rover"

* Retrieving assembly "Rover" with id ccf42f743a831a145aea7c8a

* Getting assembly features, scanning for DOFs...
* Found total 0 DOFs

* Building robot tree
* Trunk is Mechanical Integration <1>
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/onshape-to-robot", line 8, in <module>
    sys.exit(onshape_to_robot.main())
  File "/home/ubuntu/.local/lib/python3.10/site-packages/onshape_to_robot/onshape_to_robot.py", line 17, in main
    from .load_robot import \
  File "/home/ubuntu/.local/lib/python3.10/site-packages/onshape_to_robot/load_robot.py", line 336, in <module>
    if not occurrence['instance']['suppressed']:
**KeyError: 'suppressed'`**

The 'KeyError: 'suppressed' error apparently refers to 'suppressed' not being in the 'defaultdict' referred to in 'load_robot.py'.
I can't find the actual dictionary despite considerable digging.
I'll see what happens if I 'comment out' that block of code....

When I do, it gets farther until it complains about a screw with no mass, then a missing resource:

WARNING: part Socket button head cap screw #6-32 x 0.75 <3> has no mass, maybe you should assign a material to it ?
+ Adding part Pad 2 <1>
https://cad.onshape.com/api/parts/d/4e80c35d6ce2977369966f00/m/7ac9aca0c476e9242713b6a1/e/13c617a504fd8cb4616fc014/partid/JjH/stl?mode=binary&units=meter&configuration=default
! ERROR (403) while using OnShape API
! {
  "message" : "Resource does not exist, or you do not have permission to access it.",
  "moreInfoUrl" : "",
  "status" : 403,
  "code" : 0
}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions