Hi, I need to upload to nova.astrometry.net a picture and then download the correspondent RA and DEC.--I've used the requests methods with the API url, but it doesn't upload the image.
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astrometry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/86aaff62-7f26-40cc-af69-724cda9a5b22%40googlegroups.com.
R = requests.post('http://nova.astrometry.net/api/login', data={'request-json': json.dumps({"apikey": "XXXX"})})
url = 'http://nova.astrometry.net/api/upload'
files = {'file': open('XXX','rb')}
r = requests.post(url,files=files)
Hi,We have a stand-alone command-line client in python:cheers,--dustin
On Thu, Apr 16, 2020 at 10:00 AM Fede <federica....@gmail.com> wrote:
Hi, I need to upload to nova.astrometry.net a picture and then download the correspondent RA and DEC.--I've used the requests methods with the API url, but it doesn't upload the image.
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astro...@googlegroups.com.
Sorry, I don't get it, I thought I had to use the requests form like:
R = requests.post('http://nova.astrometry.net/api/login', data={'request-json': json.dumps({"apikey": "XXXX"})})
print(R.text)
url = 'http://nova.astrometry.net/api/upload'
files = {'file': open('XXX','rb')}
r = requests.post(url,files=files)
print(r.status_code)
Il giorno giovedì 16 aprile 2020 16:01:09 UTC+2, Dustin Lang ha scritto:Hi,We have a stand-alone command-line client in python:cheers,--dustinOn Thu, Apr 16, 2020 at 10:00 AM Fede <federica....@gmail.com> wrote:Hi, I need to upload to nova.astrometry.net a picture and then download the correspondent RA and DEC.--I've used the requests methods with the API url, but it doesn't upload the image.
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/86aaff62-7f26-40cc-af69-724cda9a5b22%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astrometry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/900f6d68-ca86-4229-a6c9-bb47352aeba3%40googlegroups.com.
Oh, I see, you're looking at the docs.... the docs really should be updated to suggest that people just use the client.py library...Are you including the session key when you're trying to do your file upload?"You have to include that “session” value in all subsequent requests."That is, your second POST must also include a "request-json" field.cheers,--dustin
On Thu, Apr 16, 2020 at 10:25 AM Fede <federica....@gmail.com> wrote:
Sorry, I don't get it, I thought I had to use the requests form like:--R = requests.post('http://nova.astrometry.net/api/login', data={'request-json': json.dumps({"apikey": "XXXX"})})
print(R.text)
url = 'http://nova.astrometry.net/api/upload'
files = {'file': open('XXX','rb')}
r = requests.post(url,files=files)
print(r.status_code)
Il giorno giovedì 16 aprile 2020 16:01:09 UTC+2, Dustin Lang ha scritto:Hi,We have a stand-alone command-line client in python:cheers,--dustinOn Thu, Apr 16, 2020 at 10:00 AM Fede <federica....@gmail.com> wrote:Hi, I need to upload to nova.astrometry.net a picture and then download the correspondent RA and DEC.--I've used the requests methods with the API url, but it doesn't upload the image.
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/86aaff62-7f26-40cc-af69-724cda9a5b22%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/900f6d68-ca86-4229-a6c9-bb47352aeba3%40googlegroups.com.
I have a Python program that uploads images to nova and then displays the results. You can either use it with its GUI or using command line. The command line provides a lot more options than the GUI.
It's an extension of the example python program given on the website. The only thing is you need to install Python 2.7 to use it.
You are more than welcome to have a copy. If nothing else it will give you an example of the python calls to Nova. There's a post on the APT Forum, which I think you should be able to view. If not, let me know.
https://aptforum.com/phpbb/viewtopic.php?f=24&t=1820&hilit=novasolve
Cheers, Jim