Getting job number from python automatically

50 views
Skip to first unread message

Fede

unread,
May 6, 2020, 8:38:05 AM5/6/20
to astrometry
Hello! 

I'm writing a script in Python which uploads a picture on nova.astrometry.net and gets the results using api. 
To do that, I need the job number, which I cannot collect without going manually on the website.
How can I receive this information automatically from the uploading of the image in Python?

Thank you in advance

Dustin Lang

unread,
May 6, 2020, 9:05:02 AM5/6/20
to Fede, astrometry
Hi,
When you submit an image, you get back a submission id in the JSON reply (like {"subid": 16714}).
and it will return JSON like {"processing_started": "2016-03-29 11:02:11.967627", "job_calibrations": [[1493115, 785516]],
"jobs": [1493115], "processing_finished": "2016-03-29 11:02:13.010625",
"user": 1, "user_images": [1051223]}
With your job IDs in "jobs".
cheers,
--dustin



--
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/a7a621dc-404e-47fd-87de-718eb4cec921%40googlegroups.com.

Fede

unread,
May 6, 2020, 11:46:05 AM5/6/20
to astro...@googlegroups.com
Actually it returns "jobs":[] :(
Another question, what if I want to upload and get results offline?


Il giorno mercoledì 6 maggio 2020 15:05:02 UTC+2, Dustin Lang ha scritto:
Hi,
When you submit an image, you get back a submission id in the JSON reply (like {"subid": 16714}).
and it will return JSON like {"processing_started": "2016-03-29 11:02:11.967627", "job_calibrations": [[1493115, 785516]],
"jobs": [1493115], "processing_finished": "2016-03-29 11:02:13.010625",
"user": 1, "user_images": [1051223]}
With your job IDs in "jobs".
cheers,
--dustin



On Wed, May 6, 2020 at 8:38 AM Fede <federica....@gmail.com> wrote:
Hello! 

I'm writing a script in Python which uploads a picture on nova.astrometry.net and gets the results using api. 
To do that, I need the job number, which I cannot collect without going manually on the website.
How can I receive this information automatically from the uploading of the image in Python?

Thank you in advance

--
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.

Bryan

unread,
May 6, 2020, 11:52:49 AM5/6/20
to astrometry
You may want to consider installing a local version then



Bryan

On Wednesday, May 6, 2020 at 9:46:05 AM UTC-6, Fede wrote:
Actually it returns job:[]

Fede

unread,
May 6, 2020, 12:49:30 PM5/6/20
to astrometry
Ok, I extracted the astrometry.net-latest.tar.gz... and now?

Dustin Lang

unread,
May 6, 2020, 1:05:31 PM5/6/20
to Fede, astrometry

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/575138fb-9d2b-4c1f-bb46-f4aaa322d075%40googlegroups.com.

Fede

unread,
May 7, 2020, 6:33:42 AM5/7/20
to astro...@googlegroups.com
Hey Dustin, sorry to bother you again,
I still can't collect the jobs number, since it returns an empty string like "jobs: []"

Moreover, when I install the astrometry.net on my Ubuntu, following the steps make, make extra, make install, it returns some errors at the end of the process: 
make[1]: ***[Makefile:145: install-core] Error 1
make[1]: exit from directory "/home/....
make: *** [Makefile:132: install] Error 2

Lastly, I'd like to know, once astrometry.net is installed, what should I write in the python script...

Thank you again



Il giorno mercoledì 6 maggio 2020 19:05:31 UTC+2, Dustin Lang ha scritto:

Dustin Lang

unread,
May 7, 2020, 6:57:47 AM5/7/20
to Fede, astrometry
If jobs=[] is empty, then probably the job hasn't started yet (it's queued to run).


On Thu, May 7, 2020 at 6:33 AM Fede <federica.l...@gmail.com> wrote:
Hey Dustin, sorry to bother you again,
I still can't collect the jobs number, since it returns an empty string like "jobs: []"

Moreover, when I install the astrometry.net on my Ubuntu, following the steps make, make extra, make install, it returns some errors at the end of the process: 
make[1]: ***[Makefile:145: install-core] Error 1
make[1]: exit from directory "/home/....
make: *** [Makefile:132: install] Error 2

Finally, I'd like to know, once astrometry.net is installed, what should I write in the python script...
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/f40b16bb-6ccb-4676-8402-f2085b5dbed0%40googlegroups.com.

Fede

unread,
May 7, 2020, 7:03:10 AM5/7/20
to astrometry
But on the website, it appears...


Il giorno giovedì 7 maggio 2020 12:57:47 UTC+2, Dustin Lang ha scritto:
If jobs=[] is empty, then probably the job hasn't started yet (it's queued to run).


Dustin Lang

unread,
May 7, 2020, 8:35:02 AM5/7/20
to Fede, astrometry
what's the submission id?


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/6ea3c668-4204-4f40-920d-d451b5a3a483%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages