Unicode error in writing files to disk

Bug #939516 reported by Eike
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bug-repo-syncer
Fix Released
Critical
Eike

Bug Description

There are problems with unicode encoding while writing files to disk:

Offending bug is internal version of bug Trac:#111
"Trac login, deliberate annonymous/authenticated login"
Offending bytes is a sequence of chr(160) ('NO-BREAK SPACE')
u"Launchpad login:\n\xa0\xa0\xa0\xa0* Look up"

The Unicode Howto:
http://docs.python.org/howto/unicode.html

shell command:
../../bsync.py sync --since 2012-2-20

While communicating with ``diff3`` the program raises this error:

Traceback (most recent call last):
  File "../../bsync.py", line 31, in <module>
    bsync.main()
  File "/home/eike/codedir/z-eclipse-workspace/bug_syncer/trunk/src/bug_syncer/main.py", line 96, in main
    self.do_sync(cmdinfo)
  File "/home/eike/codedir/z-eclipse-workspace/bug_syncer/trunk/src/bug_syncer/main.py", line 262, in do_sync
    syncer.synchronize_repos()
  File "/home/eike/codedir/z-eclipse-workspace/bug_syncer/trunk/src/bug_syncer/main.py", line 818, in synchronize_repos
    write_tasks = [self.merge_bug(mtask) for mtask in merge_tasks]
  File "/home/eike/codedir/z-eclipse-workspace/bug_syncer/trunk/src/bug_syncer/main.py", line 687, in merge_bug
    merged_txt = self.merge_diff3(my_txt, base_txt, other_txt)
  File "/home/eike/codedir/z-eclipse-workspace/bug_syncer/trunk/src/bug_syncer/main.py", line 616, in merge_diff3
    os.write(old_fd, old_text); os.close(old_fd)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 177-180: ordinal not in range(128)

Eike (eike-welk)
Changed in bug-repo-syncer:
milestone: none → 0.1.0
assignee: nobody → Eike (eike-welk)
importance: Undecided → Critical
status: New → Confirmed
Eike (eike-welk)
summary: - Unicode error in reading files from disk
+ Unicode error in writing files to disk
Eike (eike-welk)
description: updated
description: updated
Eike (eike-welk)
description: updated
Eike (eike-welk)
description: updated
Eike (eike-welk)
description: updated
Eike (eike-welk)
Changed in bug-repo-syncer:
status: Confirmed → 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.