Re: TypeError: argument 1 must be string without null bytes, not str, repr() unavailable

2006-10-04 Thread Ned Batchelder




I haven't managed to reproduce it.  I was hoping maybe others had seen
it on their servers and knew it's cause.

--Ned.

Malcolm Tredinnick wrote:

  On Wed, 2006-10-04 at 16:27 -0400, Ned Batchelder wrote:
  
  
Every once in a while, we get a stack trace from our production Django
servers with this error:

  ...
  File "/apps/mine/views/mine.py", line 481, in my_view
params = request.REQUEST

  File "/site-packages/django/core/handlers/modpython.py", line 38, in _get_request
self._request = datastructures.MergeDict(self.POST, self.GET)

  File "/site-packages/django/core/handlers/modpython.py", line 51, in _get_post
self._load_post_and_files()

  File "/site-packages/django/core/handlers/modpython.py", line 34, in _load_post_and_files
self._post, self._files = http.QueryDict(self.raw_post_data), datastructures.MultiValueDict()

  File "/site-packages/django/http/__init__.py", line 82, in __init__
for key, value in parse_qsl((query_string or ''), True): # keep_blank_values=True

TypeError: argument 1 must be string without null bytes, not str


Request repr() unavailable

Does anyone know what causes this, and what to do about it?

  
  
I haven't seen it with Django, but I have seen this sort of error on
other projects when trying to log arbitrary information and the string
ended up containing zero bytes (because of a bad third-party producer of
the data).

Can you trigger the error with a hand-crafted URL that contains "%00"
fragments, perhaps?

Sorry, not too helpful, but it's going to be hard to guess what is
causing this without being in your position and able to know what is
happening at the time.

Regards,
Malcolm





.

  


-- 
Ned Batchelder, http://nedbatchelder.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django users" group.  To post to this group, send email to django-users@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---





Re: TypeError: argument 1 must be string without null bytes, not str, repr() unavailable

2006-10-04 Thread Malcolm Tredinnick

On Wed, 2006-10-04 at 16:27 -0400, Ned Batchelder wrote:
> Every once in a while, we get a stack trace from our production Django
> servers with this error:
> 
>   ...
>   File "/apps/mine/views/mine.py", line 481, in my_view
> params = request.REQUEST
> 
>   File "/site-packages/django/core/handlers/modpython.py", line 38, in 
> _get_request
> self._request = datastructures.MergeDict(self.POST, self.GET)
> 
>   File "/site-packages/django/core/handlers/modpython.py", line 51, in 
> _get_post
> self._load_post_and_files()
> 
>   File "/site-packages/django/core/handlers/modpython.py", line 34, in 
> _load_post_and_files
> self._post, self._files = http.QueryDict(self.raw_post_data), 
> datastructures.MultiValueDict()
> 
>   File "/site-packages/django/http/__init__.py", line 82, in __init__
> for key, value in parse_qsl((query_string or ''), True): # 
> keep_blank_values=True
> 
> TypeError: argument 1 must be string without null bytes, not str
> 
> 
> Request repr() unavailable
> 
> Does anyone know what causes this, and what to do about it?

I haven't seen it with Django, but I have seen this sort of error on
other projects when trying to log arbitrary information and the string
ended up containing zero bytes (because of a bad third-party producer of
the data).

Can you trigger the error with a hand-crafted URL that contains "%00"
fragments, perhaps?

Sorry, not too helpful, but it's going to be hard to guess what is
causing this without being in your position and able to know what is
happening at the time.

Regards,
Malcolm


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



TypeError: argument 1 must be string without null bytes, not str, repr() unavailable

2006-10-04 Thread Ned Batchelder




Every once in a while, we get a stack trace from our production Django
servers with this error:

  ...
  File "/apps/mine/views/mine.py", line 481, in my_view
params = request.REQUEST

  File "/site-packages/django/core/handlers/modpython.py", line 38, in _get_request
self._request = datastructures.MergeDict(self.POST, self.GET)

  File "/site-packages/django/core/handlers/modpython.py", line 51, in _get_post
self._load_post_and_files()

  File "/site-packages/django/core/handlers/modpython.py", line 34, in _load_post_and_files
self._post, self._files = http.QueryDict(self.raw_post_data), datastructures.MultiValueDict()

  File "/site-packages/django/http/__init__.py", line 82, in __init__
for key, value in parse_qsl((query_string or ''), True): # keep_blank_values=True

TypeError: argument 1 must be string without null bytes, not str


Request repr() unavailable

Does anyone know what causes this, and what to do about it?
-- 
Ned Batchelder, http://nedbatchelder.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django users" group.  To post to this group, send email to django-users@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---