#9696: FileField raises unhandled exception when filename contains non-ascii
characters
-------------------------------------------+--------------------------------
Reporter: magarac | Owner: nobody
Status: reopened | Milestone:
Component: File uploads/storage | Version: 1.0
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Changes (by aarond10):
* status: closed => reopened
* resolution: worksforme =>
Comment:
I am having this problem also. Reared its head in pinax svn version when
using the avatar upload feature
. Filename is in Japanese. The file was uploaded via Firefox 3.
- Aaron
{{{
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py",
line 86, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.5/site-
packages/django/contrib/auth/decorators.py", line 67, in __call__
return self.view_func(request, *args, **kwargs)
File "/var/www/django/pinax0.5.0/apps/external_apps/avatar/views.py",
line 48, in change
File "/usr/lib/python2.5/site-packages/django/core/files/storage.py",
line 44, in save
name = self.get_available_name(name)
File "/usr/lib/python2.5/site-packages/django/core/files/storage.py",
line 66, in get_available_nam
e
while self.exists(name):
File "/usr/lib/python2.5/site-packages/django/core/files/storage.py",
line 188, in exists
return os.path.exists(self.path(name))
File "/usr/lib/python2.5/posixpath.py", line 171, in exists
st = os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode characters in position
67-69: ordinal not in range(128
)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/9696#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---