Browse Activity cant't download files with accents on filename

Raúl Gutiérrez Segalés rgs at rieder.net.py
Mon Oct 20 18:31:03 EDT 2008


I searched trac and googled a little for this, so sorry if this is a known
issue.

This is on build 765. When I try to download an attachment that has a
filename with accents Browse does nothing and I get this on it's log:

ERROR:xpcom:Unhandled exception calling 'int8 promptForSaveToFile(in
nsISomething, in nsISomething, in wstring, in wstring, in boolean, out
retval nsISomething);'
Traceback (most recent call last):
  File "/usr/lib/xulrunner-1.9/python/xpcom/server/policy.py", line 277,
in _CallMethod_
    return 0, func(*params)
  File "/home/olpc/Activities/Browse.activity/downloadmanager.py", line
100, in promptForSaveToFile
    fd, file_path = tempfile.mkstemp(dir=_temp_path, prefix=base_name,
suffix=extension)
  File "/usr/lib/python2.5/tempfile.py", line 302, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/lib/python2.5/tempfile.py", line 236, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in
position 64: ordinal not in range(128)
1224543813.083328 ERROR xpcom: Unhandled exception calling 'int8
promptForSaveToFile(in nsISomething, in nsISomething, in wstring, in
wstring, in boolean, out retval nsISomething);'
Traceback (most recent call last):
  File "/usr/lib/xulrunner-1.9/python/xpcom/server/policy.py", line 277,
in _CallMethod_
    return 0, func(*params)
  File "/home/olpc/Activities/Browse.activity/downloadmanager.py", line
100, in promptForSaveToFile
    fd, file_path = tempfile.mkstemp(dir=_temp_path, prefix=base_name,
suffix=extension)
  File "/usr/lib/python2.5/tempfile.py", line 302, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/lib/python2.5/tempfile.py", line 236, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in
position 64: ordinal not in range(128)
ERROR:xpcom:Unhandled exception calling 'int8 show(in nsISomething, in
nsISomething, in uint32);'
Traceback (most recent call last):
  File "/usr/lib/xulrunner-1.9/python/xpcom/server/policy.py", line 277,
in _CallMethod_
    return 0, func(*params)
  File "/home/olpc/Activities/Browse.activity/downloadmanager.py", line
108, in show
    launcher.saveToDisk(None, False)
  File "<XPCOMObject method 'saveToDisk'>", line 3, in saveToDisk
Exception: -2147467259 (-2147467259)
1224543813.107100 ERROR xpcom: Unhandled exception calling 'int8 show(in
nsISomething, in nsISomething, in uint32);'
Traceback (most recent call last):
  File "/usr/lib/xulrunner-1.9/python/xpcom/server/policy.py", line 277,
in _CallMethod_
    return 0, func(*params)
  File "/home/olpc/Activities/Browse.activity/downloadmanager.py", line
108, in show
    launcher.saveToDisk(None, False)
  File "<XPCOMObject method 'saveToDisk'>", line 3, in saveToDisk
Exception: -2147467259 (-2147467259)



-----------------------
Raúl Gutiérrez Segalés
  +595 981 231 839




More information about the Devel mailing list