Skip to main content
Solved

"Could not parse request body" error using python airtable wrapper

  • February 15, 2021
  • 1 reply
  • 62 views

Forum|alt.badge.img+5

I am using python to run sum calculations and data summaries at various sub-groupings. This is being done using python pandas and the data format is a dataframe. I have to convert this dataframe to a list according to the airtable python wrapper documentation, which I have used before, just not the dataframe part.

After converting to a list, I am getting this error

requests.exceptions.HTTPError: (‘422 Client Error: Unprocessable Entity for url: https://api.airtable.com/v0/appQzuUudoe2rSAR0/Test-2’, “422 Client Error: Unprocessable Entity for url: https://api.airtable.com/v0/appQzuUudoe2rSAR0/Test-2 [Error: {‘type’: ‘INVALID_REQUEST_BODY’, ‘message’: ‘Could not parse request body’}]”)

is anyone familiar with this any why it is happening?

Best answer by aaron_bell

UPDATE: Python Pandas had some NaN values, this needed to be converted to 0. Airtable then accepted the list.

1 reply

Forum|alt.badge.img+5
  • Author
  • Inspiring
  • Answer
  • February 15, 2021

UPDATE: Python Pandas had some NaN values, this needed to be converted to 0. Airtable then accepted the list.