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.

ValueError at / invalid literal for int() with base 10: ''

See original GitHub issue

I configure raven with Django as per the documentation by sentry here but when i run server i am getting this error

Internal Server Error: /
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 39, in inner
    response = get_response(request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 244, in _legacy_get_response
    response = middleware_method(request)
  File "/usr/local/lib/python2.7/dist-packages/raven/contrib/django/middleware/__init__.py", line 135, in process_request
    request.body  # forces stream to be read into memory
  File "/usr/local/lib/python2.7/dist-packages/django/http/request.py", line 267, in body
    int(self.META.get('CONTENT_LENGTH', 0)) > settings.DATA_UPLOAD_MAX_MEMORY_SIZE):
ValueError: invalid literal for int() with base 10: ''
[02/Oct/2017 12:25:02] "GET / HTTP/1.1" 500 67787

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ashwoodscommented, Oct 2, 2017

This is a Django bug that was fixed here: https://github.com/django/django/commit/5c63b3e5a797102d915e1683971517f747a28013 and at least doesn’t trip with django 1.10.8

I’ll catch the exception, but you might consider upgrading to the latest 1.10 version if possible.

0reactions
alkhatibdevcommented, Nov 19, 2019

This is a Django bug that was fixed here: django/django@5c63b3e and at least doesn’t trip with django 1.10.8

I’ll catch the exception, but you might consider upgrading to the latest 1.10 version if possible.

This works for me so well, Thanks ❤️

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: invalid literal for int() with base 10: '' - Stack Overflow
The reason is that you are getting an empty string or a string as an argument into int. Check if it ...
Read more >
Python ValueError: invalid literal for int() with base 10
This error can frequently occur when converting user-input to an integer-type using the int() function. This problem happens because Python stores the input...
Read more >
ValueError: invalid literal for int() with base 10
The error message invalid literal for int() with base 10 would seem to indicate that you are passing a string that's not an...
Read more >
Python ValueError: invalid literal for int() with base 10 Solution
Our error message tells us there is an invalid literal for an integer in base 10. This means the value we have passed...
Read more >
ValueError: invalid literal for int() with base 10 in Python
The Python "ValueError: invalid literal for int() with base 10" occurs when we pass a string that cannot be directly converted to an...
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