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

pass data by file #589

Closed
wants to merge 1 commit into from
Closed

pass data by file #589

wants to merge 1 commit into from

Conversation

Jerry-Ma
Copy link
Contributor

@Jerry-Ma Jerry-Ma commented Oct 8, 2015

I don't know whether this is universal or not. When I tries to do cross_id for a larger list of coordinates (~400, which is not that large really), it fails and gives such message:

Your_browser_sent_an_invalid_request
------------------------------------
                      </body></html>

Without digging into the details, I suspect this is due to some limitation in requests library (?)

Instead of passing the data via paste field, now the data is passed as a file. At least this now works for me.

@keflavich
Copy link
Contributor

I wonder if this is a limitation of POST requests in general?

It looks like data is a string in what you passed, but I think it needs to be a file object: http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file

@bsipocz
Copy link
Member

bsipocz commented Oct 9, 2015

I can check this over the weekend, but the function definitely worked for
me for thousands of objects, with the old infrastructure. Something might
have broken since.
On Oct 9, 2015 6:29 AM, "Adam Ginsburg" notifications@github.com wrote:

I wonder if this is a limitation of POST requests in general?

It looks like data is a string in what you passed, but I think it needs
to be a file object:
http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file


Reply to this email directly or view it on GitHub
#589 (comment).

@bsipocz bsipocz force-pushed the master branch 2 times, most recently from ab0c591 to 712c326 Compare June 8, 2018 12:58
@bsipocz
Copy link
Member

bsipocz commented Feb 23, 2022

This works beautifully, and I expect the same logic may even fix #2211. I will open a follow-up PR instead using the commit from here rebased on the top of main as it seems that this PR proceeds the times when github allowed maintainers to push to PR branches.

@bsipocz bsipocz mentioned this pull request Feb 23, 2022
@bsipocz
Copy link
Member

bsipocz commented Feb 23, 2022

Superseeded by #2305 and therefore closing. Thanks @Jerry-Ma for the fix, and I'm sorry it took this long to get this finish off and close to merge.

@bsipocz bsipocz closed this Feb 23, 2022
@Jerry-Ma
Copy link
Contributor Author

@bsipocz I am really glad that this works out after these years. Time really flies by. Cheers!

@bsipocz
Copy link
Member

bsipocz commented Feb 24, 2022

Yes, the sdss archive is amazingly stable with a reliable API, outstanding amongst all.

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

Successfully merging this pull request may close these issues.

3 participants