Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to correctly call the API endpoint with Python 3 without getting error 500?

I am following the instruction as per the API documentation and enquiring the following endpoint:

summary = 'https://api.pancakeswap.info/api/v2/summary'

However I am getting the following error:

{'error': {'code': 500, 'message': 'GraphQL error: panic processing query: only derived fields can lead to multiple children here'}}

Here is my code:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

import requests
import json

summary = 'https://api.pancakeswap.info/api/v2/summary'

def get_data(endpoint):
    data = requests.get(endpoint).json()
    print(data)


get_data(summary)

What am I doing wrong and how to fix it?

>Solution :

There is a problem with the server. I even tried to use their own Run button on their website and got the same message:

Image

When running other API calls, there was no error, so I think there is just an issue with this specific API call.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading