Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about downloading public stl models from Onshape? #13

Closed
ArthurYowza3d opened this issue May 11, 2016 · 2 comments
Closed

Question about downloading public stl models from Onshape? #13

ArthurYowza3d opened this issue May 11, 2016 · 2 comments

Comments

@ArthurYowza3d
Copy link

Wish to download an stl file. Currently using a simple approach:
https://partner.dev.onshape.comapi/documents/d/405396d32ddaf0ae85bbb381/w/84cb220a3415aedfaf4c4c02/e/e02c7ca6c5bc16dd26949153/export?units=inch&scale=1&mode=binary&format=STL

Getting max retries:
Max retries exceeded with url: /documents/d/405396d32ddaf0ae85bbb381/w/84cb220a3415aedfaf4c4c02/e/e02c7ca6c5bc16dd26949153/export?units=inch&scale=1&mode=binary&format=STL

Any clues?
This is what the code looks like:

Here is another code sample:payload = {'format': 'STL', 'mode': 'binary', 'scale': '1', 'units': 'inch'}
response = self._api.request('get', 'api/documents/d/' + did + '/w/' + wid + '/e/' + eid + '/export', query=payload, download=True)

[download] controls streaming = True.

@lararosekelley
Copy link

hi! looks like you're using the python app (which i wrote); be sure to put the forward slash "/" at the beginning of your URL path. also, "download" is not a param accepted by the module (or the python requests module itself)

@ArthurYowza3d
Copy link
Author

ArthurYowza3d commented May 12, 2016

Oh yeah, sorry, it is one I've added to allow users our our internal branch of your api to set "stream" to true if that makes sense.

    res = requests.request(method, url, headers=req_headers, data=body, stream=download)

And thanks! Hope you have a great day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants