Python API Library Started Throwing Error

jrjacoby
jrjacoby
edited 06/14/22 in Add Ons and Integrations

Hi all,

I've been using the Python API to update a sheet on a nightly basis. It's been working fine until a couple days ago (not sure exactly when). Now when I call smartsheet.Sheets.delete_rows(sheet_id, list_of_row_ids), I get the following json response:

{"response": {"statusCode": 400, "reason": "Bad Request", "content": "<< text/html; charset=iso-8859-1 content type suppressed >>"}}

Any idea what might have changed? Any help is appreciated, thank you!

Best,

John

Answers

  • Finding similar. Something with the self part of update_rows(self, sheet_id, list_of_rows).

  • The scheduled job that failed with content-type error has run fine a few time since. Smartsheet must be making updates or doing some testing.

  • @hnielsen Yep I'm finding exactly the same thing. It keeps working on and off.

  • I'm still getting this issue. Hoping someone from SmartSheets can chime in.

  • Julio S.
    Julio S. Moderator
    edited 03/05/22

    Hi @jrjacoby,

    I've been researching about this specific error and I've found this is generally related to the "Accept" header not being included in a call. This post in Stack overflow may offer you some guidance about the same error returned by a call in Java. If you need help or troubleshooting with your coding, I'd recommend referring to Stack overflow. If you keep encountering intermittent errors when using this SDK library, you may want to open a ticket with our Support team via this form bearing in mind that Support can't help troubleshooting your code. 

    I hope this can be of help.

    Cheers!

    Julio