'Unexpected End To JSON' Even When Using Official Site

Hi,
I’m trying to create a simple application that looks at my skills just to test ESI. I’ve managed to go through the whole SSO system, get my auth key and access token, etc. etc… While trying to use the ESI endpoint to get my current skills, I keep getting a 403 response with an “Error: Unexpected End To JSON”. This happens whenever I request it, even if I’m using the ‘Try It Out’ button on the ESI site.

Any possible reasons this problem could be occurring? I’ve tried including the token in the url rather than the header, getting a new access token, the works, it just never seems to change anything. I can post code samples if you would like.

I usually see this error when the response payload is not in a json format, but some kind of error code string. I suggest printing the whole response body, instead of serializing it to json for debugging purposes.

Yes, otherwise we can only guess.

##I assume here that I've already gotten a valid 
##Access Token and Refresh Code since I haven't
##Gotten any errors with that so far.
import requests
r = requests.get('https://login.eveonline.com/oauth/verify', headers={'Authorization': 'Bearer %s'%(auth_code)})
character_id = r.json()['CharacterID']
r = requests.get('https://esi.evetech.net/latest/characters/%s/skills'%(character_id), headers={'Authorization': 'Bearer <%s>'%(auth_code)})
return r.json()

In this situation, or when using the ‘try me’ button on the Swagger site, I get the following content returned from the site:

{
  "error": "unexpected end of JSON input",
  "sso_status": 401
}

I’m perfectly willing to admit that my code is incorrect or that I’m doing something wrong, but I don’t see how I could be messing up the site seeing as I’m literally just filling in text boxes.