question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Newer versions of requests library cause HTTP header issue

See original GitHub issue
  • CurrentMediaStorageUsageInMB: int, current attachment content (media) usage in MBs (Retrieved from gateway ).

HTTP headers in the latest versions of the request library cause the following error: requests.exceptions.InvalidHeader: Header value 0 must be of type str or bytes, not <class ‘int’>

Judging from a quick lookup in the code, the ‘CurrentMediaStorageUsageInMB’ value seems to be the culprit.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rnagpalcommented, Apr 27, 2017

We have fixed this issue in the Python SDK 2.1.0 release. Please let us know if you run into any issues.

0reactions
rnagpalcommented, Apr 24, 2017

The fix is checked in to our internal repo. I’ll get the release out in next few days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot a "Request header too large" message or 400 ...
The "Request header too large" message is thrown with an HTTP error code 400. This error occurs if the size of the request...
Read more >
Cross-Origin Resource Sharing (CORS) - MDN Web Docs
Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows ... Additionally, for HTTP request methods that can cause ...
Read more >
Community Updates — Requests 2.28.1 documentation
Fixed issue where non-UTF8 reason phrases got severely mangled by falling back to decoding using ISO 8859-1 instead. Fixed a bug where Requests...
Read more >
"OverflowError: string longer than 2147483647 bytes ... - GitHub
In my case I have a 2GB+ POST request (not a file, just POST data). This is for an elasticsearch bulk update. The...
Read more >
Python Requests Library: Up-To-Date 2022 Guide - Oxylabs
Python Requests Library is the most powerful tool for automating HTTP requests. Find out how to maximize common features of the Requests module...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found