Windows pyinotify implementation cannot deal with utf8

Bug #805372 reported by Manuel de la Peña
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Fix Released
High
Manuel de la Peña

Bug Description

When working with a unicode path the following exception is raised:

C:\Users\Mandel\Documents\ubuntuone-client\irl>python ubuntuone-syncdaemon
2011-07-04 11:06:33,456:456.000089645 - ubuntu_sso.main.windows - DEBUG - SSOLog
in is <twisted.spread.pb.RemoteReference instance at 0x0336EDA0>
2011-07-04 11:06:33,463:463.000059128 - ubuntu_sso.main.windows - INFO - Perform
ing find_credentials as a remote call.
Traceback (most recent call last):
  File "C:\Python27\lib\logging\handlers.py", line 77, in emit
    if self.shouldRollover(record):
  File "C:\Users\Mandel\Documents\ubuntuone-client\irl\ubuntuone\logger.py", lin
e 101, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "C:\Python27\lib\logging\__init__.py", line 719, in format
    return fmt.format(record)
  File "C:\Python27\lib\logging\__init__.py", line 464, in format
    record.message = record.getMessage()
  File "C:\Python27\lib\logging\__init__.py", line 328, in getMessage
    msg = msg % self.args
  File "C:\Users\Mandel\Documents\ubuntuone-client\irl\ubuntuone\platform\window
s\pyinotify.py", line 240, in __str__
    return repr(self)
  File "C:\Users\Mandel\Documents\ubuntuone-client\irl\ubuntuone\platform\window
s\pyinotify.py", line 231, in __repr__
    output_format.field_value(value))
  File "C:\Users\Mandel\Documents\ubuntuone-client\irl\ubuntuone\platform\window
s\pyinotify.py", line 54, in field_value
    return self.simple(s, 'purple')
  File "C:\Users\Mandel\Documents\ubuntuone-client\irl\ubuntuone\platform\window
s\pyinotify.py", line 44, in simple
    s = str(s)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 2-3: ordin
al not in range(128)

Related branches

Changed in ubuntuone-client:
assignee: nobody → Manuel de la Pena (mandel)
Changed in ubuntuone-client:
status: In Progress → Fix Committed
dobey (dobey)
Changed in ubuntuone-client:
milestone: none → 1.7.1
dobey (dobey)
Changed in ubuntuone-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.