Ticket #1119 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

UnicodeEncodeError while browsing for files in a directory containing accent

Reported by: Dad Owned by: ales
Milestone: Component: library
Severity: minor Keywords:
Cc: Blocking:
Blocked By:


Return of QFileDialog.getOpenFileName() method is not properly checked. Opening a file within a folder containing accents result in:

Unhandled exception of type UnicodeEncodeError occured at 16:10:00: Traceback:

File: OWFile.py, line 202 in browseFile Code: filename = str(QFileDialog.getOpenFileName(self, 'Open Orange Data File', startfile, self.dlgFormats))

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 12: ordinal not in range(128)

It appears that this error is potentially located into many OrangeWidgets files : % grep -Rni "str(QFileDialog.getOpenFileName" /usr/lib/python2.7/site-packages/orange/

This is corrected in attached patch, for OWFile.py.


OWFile.py.patch Download (658 bytes) - added by Dad 3 years ago.
OWFile.py patch

Change History

Changed 3 years ago by Dad

OWFile.py patch

comment:1 Changed 3 years ago by ales

  • Owner set to ales
  • Status changed from new to assigned

comment:2 Changed 3 years ago by ales

  • Status changed from assigned to closed
  • Resolution set to fixed

I think most of the Open/Save dialogs should now accept unicode pathnames.

Note: See TracTickets for help on using tickets.