Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Python API: 401 Unauthorised when include_mate_connectors set to true in get_assembly_def arguments
anthony_cheung
Member Posts: 6 ✭
https://github.com/onshape-public/python-client/blob/master/docs/AssembliesApi.md#get_assembly_definition
^ I've been using the above code to get the assembly definition but when I set include_mate_connectors in get_assembly_definition call I get a 401 error.
However it works fine if I remove them.
Wondering if anyone could help diagnose this issue. Thanks.
^ I've been using the above code to get the assembly definition but when I set include_mate_connectors in get_assembly_definition call I get a 401 error.
However it works fine if I remove them.
Wondering if anyone could help diagnose this issue. Thanks.
Tagged:
0
Comments
installed onshape-client with pip install (confirmed on 0.0.24)
cloned the onshape-clients repo
pipenv shell in onshape-clients/python then ran my get assembly definition code
and now I'm getting Error 111 Connection Refused.
tried without pipenv --> same error
Let me know if I did something wrong, thanks.
prod: base_url: "https://cad.onshape.com"
secret_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
access_key: XXXXXXXXXXXXXX default_stack: prod
Fixes the issue 111 error because the URL is correct now. Default configuration.host is set to localhost in configuration.py.
However, now I get a returned None from my API call. Any ideas?
I copied the URL the program uses and it works in my browser.