onshape-to-robot icon indicating copy to clipboard operation
onshape-to-robot copied to clipboard

Error 406 while using OnShape API: Request not acceptable

Open michaellin opened this issue 3 years ago • 4 comments

It seems like something has changed on the OnShape API side that is breaking even the basic URDF or SDF exporting. Full message is:

! ERROR (406) while using OnShape API ! { "moreInfoUrl" : "", "message" : "Request not acceptable.", "status" : 406, "code" : 0 }

michaellin avatar Apr 26 '22 18:04 michaellin

Hello Sorry I am away, will be back next week and check that then If you have some time you can check which underlying request fails

Gregwar avatar Apr 26 '22 18:04 Gregwar

Apparently this comes from the Accept header that was too restrictive, should be fixed now

Gregwar avatar Apr 27 '22 19:04 Gregwar

Hello Gregwar, thanks a lot for your fast fix and your work in general! It seems to work. The only thing is, that the program fails to exit correctly. To me it ends with:

* Writing URDF file
Traceback (most recent call last):
  File "/home/david/anaconda3/envs/Onshape/bin/onshape-to-robot", line 8, in <module>
    sys.exit(onshape_to_robot())
TypeError: 'module' object is not callable

davidschnermann avatar Apr 28 '22 11:04 davidschnermann

@davidschnermann what version are you using?

The bin/ directory isn't a thing since https://github.com/Rhoban/onshape-to-robot/pull/60/files

If you installed it with pip it should work, else (if you cloned the repository) you can also consider running directly the module:

python -m onshape_to_robot.onshape_to_robot

Gregwar avatar Apr 30 '22 08:04 Gregwar