#8857 HIGH Not Tri: Browse fails to download some files with non-ascii characters

Zarro Boogs per Child bugtracker at laptop.org
Tue Oct 21 04:42:22 EDT 2008


#8857: Browse fails to download some files with non-ascii characters
-----------------------------+----------------------------------------------
 Reporter:  tomeu            |         Owner:  erikos     
     Type:  defect           |        Status:  new        
 Priority:  high             |     Milestone:  Not Triaged
Component:  browse-activity  |       Version:             
 Keywords:                   |   Next_action:  never set  
 Verified:  0                |     Blockedby:             
 Blocking:                   |  
-----------------------------+----------------------------------------------
 Raúl Gutiérrez Segalés reported:

 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)
 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/8857>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list