Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

Python call to V4 Api parse error on calling member data

We've not made any code changes but notice since the 15th July, we've been getting a parse error :

{'errors': [{'message': 'Parse error on ")" (RPAREN) at [1, 66]', 'locations': [{'line': 1, 'column': 66}]}]}

The code we're executing is (login removed):

endcursor = ""
while endcursor != '\"None\"':
    query = "query {{ organization(login:xxxx) {{ membersWithRole(first:100 after:{}) {{ totalCount edges {{ node {{ id login isSiteAdmin }}}} pageInfo {{ endCursor }}}}}} rateLimit{{ cost remaining }}}}".format(endcursor)
    r = requests.post(GITHUB_V4_API_ENDPOINT,json={'query': query},headers=GITHUB_V4_HEADERS)
    rawdata = r.json()
    print (rawdata)
    data = rawdata["data"]
    endcursor = '\"{}\"'.format(data["organization"]["membersWithRole"]["pageInfo"]["endCursor"])

 

Has anyone experienced this recently ?

I cannot see any changes to the v4 on the 14th / 15th that could cause this.

2 Replies
Community Manager
Message 2 of 3

Re: Python call to V4 Api parse error on calling member data

Hi @humaya01,

 

Thank you for being here and apologies for the delay in response, are you still experiencing this issue?


Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 2
Message 3 of 3

Re: Python call to V4 Api parse error on calling member data

Hi @AndreaGriffiths11 ,

 

Thanks for the warm welcome. We are indeed seeing the issues.