Hyperion hat geschrieben:Die Fehlermeldung passt nicht zur Beschreibung. Zudem würde ich mal unabhängig von der DB mit festen Strings testen.
Sorry für meine Ungenauigkeit.
Wenn ich folgendes übergebe:
Code: Alles auswählen
c_id3_author_value = u"Max".encode( "cp1252" ) + " " + u"Müller".encode( "cp1252" )
erhalte ich diese Fehlermeldung:
Traceback (most recent call last):
File "D:\SRB_Tools\podcast_beamer.py", line 523, in <module>
lets_rock()
File "D:\SRB_Tools\podcast_beamer.py", line 494, in lets_rock
podcast_temp = encode_file( podcast_sendung )
File "D:\SRB_Tools\podcast_beamer.py", line 340, in encode_file
p = subprocess.Popen([c_lame_encoder, "--add-id3v2", c_id3_title, c_id3_title_value, c_id3_author, c_id3_author_value, c_source_file, c_dest_file ], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate( )
File "C:\Python26\lib\subprocess.py", line 621, in __init__
errread, errwrite)
File "C:\Python26\lib\subprocess.py", line 789, in _execute_child
args = list2cmdline(args)
File "C:\Python26\lib\subprocess.py", line 557, in list2cmdline
return ''.join(result)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xfc in position 0: ordinal not in range(128)
bei diesem Befehl:
Code: Alles auswählen
p = subprocess.Popen([c_lame_encoder, "--add-id3v2", c_id3_title, c_id3_title_value, c_id3_author, c_id3_author_value, c_source_file, c_dest_file ], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate( )
Ein type der variable c_id3_author_value sagt mir hier:
<type 'str'>
Fülle ich die variable so:
c_id3_author_value = u"Max" + " " + u"Müller"
sagt mir type logischerweise:
<type 'unicode'>
und ich bekomme diese Fehlermeldung an der gleichen Stelle wie oben:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 76: ordinal not in range(128)
Vieleicht seht Ihr hier schon was ich falsch mache...