Bugs item #1621271, was opened at 2006-12-23 14:56
Message generated for change (Comment added) made by duncanwebb
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1621271&group_id=46652

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.x svn
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Gorka Olaizola (gorka)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unicode error inserting a CDR

Initial Comment:
I inserted a CDR with some mp3 and get this traceback. My system is configured 
with the locale es_ES.UTF-8 and the /etc/fstab uses utf8 too for the cdrom

/dev/hda        /media/dvd   iso9660 user,noauto,utf8     0       0

I checked with the program "convmv" that the files have correct UTF-8 
characters.

<pre>
Exception in thread Thread-2:
Traceback (most recent call last):
  File "threading.py", line 442, in __bootstrap
    self.run()
  File "/usr/lib/python2.4/site-packages/freevo/plugins/rom_drives.py", line 
736, in run
    self.check_all()
  File "/usr/lib/python2.4/site-packages/freevo/plugins/rom_drives.py", line 
696, in check_all
    self.identify(media)
  File "/usr/lib/python2.4/site-packages/freevo/plugins/rom_drives.py", line 
547, in identify
    video_files = util.match_files(media.mountdir, config.VIDEO_SUFFIX)
  File "/usr/lib/python2.4/site-packages/freevo/util/fileops.py", line 203, in 
match_files
    files = [ vfs.join(dirname, fname) for fname in os.listdir(dirname) if
  File "/usr/lib/python2.4/site-packages/freevo/util/vfs.py", line 79, in 
isfile    overlay = getoverlay(name)
  File "/usr/lib/python2.4/site-packages/freevo/util/vfs.py", line 55, in 
getoverlay
    return '%s/disc/%s%s' % (config.OVERLAY_DIR, media.id, directory)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 26: 
ordinal not in range(128)
</pre>

----------------------------------------------------------------------

>Comment By: Duncan Webb (duncanwebb)
Date: 2006-12-23 19:35

Message:
Logged In: YES 
user_id=104395
Originator: NO

Will you add before line 55 a print statement, something like:
print 'OVERLAY_DIR=%r' % config.OVERLAY_DIR, 'media.id=%r' % media.id,
'directory=%r' % directory
More than likely the directory has a non-ascii character.

There are two possibilities here 
1) set encoding in site.py to either utf-8 or iso-8859-1, possible utf-8.
2) add a try: except UnicodeError: block around line 55 and call
String(directory), etc. in the except block.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1621271&group_id=46652

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to