Astrometry.net API Login Problem

102 views
Skip to first unread message

Alexis T

unread,
Jul 9, 2020, 1:23:10 PM7/9/20
to astrometry
Hello,

So, I'm using the client.py to login and use Astrometry.net and it was working perfectly before today. All of the sudden it is having a problem with logging in. This code:

astrometry = Client()
astrometry.login(key)

Calls the login function of the client.py object (here for reference):

def login(self, apikey):
args = { 'apikey' : apikey }
result = self.send_request('login', args)
sess = result.get('session')
#print('Got session:', sess)
if not sess:
raise RequestError('no session in result')
self.session = sess

And produces this error (apikey X'ed out for privacy, but in the actual error it is the correct apikey for me, I've checked):

File "/Users/alexistudor/PycharmProjects/photometry-plus/photometry.py", line 569, in getWCS
    astrometry.login(key)
File "/Users/alexistudor/PycharmProjects/photometry-plus/client/client.py", line 120, in login
    result = self.send_request('login', args)
File "/Users/alexistudor/PycharmProjects/photometry-plus/client/client.py", line 110, in send_request
    raise RequestError('server error message: ' + errstr)
client.client.RequestError: server error message: failed to parse JSON: "{"apikey": "XXXXXXXXX"}"

This code was working perfectly before, and to my knowledge, {"apikey" : "XXXXXXXX"} is the correct formatting for the login JSON. Any idea why it isn't working anymore?

Sincerely,
Alexis Tudor

Dustin Lang

unread,
Jul 9, 2020, 2:18:48 PM7/9/20
to Alexis T, astrometry
Sorry about that, I just deployed a code update that had a bug in the JSON parsing!  Should now be fixed -- try now?
--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/8ab37364-551a-49cf-9d90-9e1215a6ca0do%40googlegroups.com.

Alexis T

unread,
Jul 9, 2020, 3:38:40 PM7/9/20
to astrometry
Yup! Works just fine now, thank you for the quick fix!

Alexis
To unsubscribe from this group and stop receiving emails from it, send an email to astro...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages