Sansung YH-920 + Linux + yh-925-db-0.1.py = AttributeError: 'module' object has no attribute 'decode'

rsd spam at spam.spam
Sat Jul 22 14:06:03 EDT 2006


Hi,

I'm trying get Samsung YH-920 mp3 player to work with Debian GNU/Linux. 
To do that I need to run
   http://www.paul.sladen.org/toys/samsung-yh-925/yh-925-db-0.1.py 
script, the idea behind the script is described at
   http://www.paul.sladen.org/toys/samsung-yh-925/

I'm getting errors and hoping someone could give me some hints, for I 
have no python background.

This is what I've done:
1. mounted YH-920 as /mnt/usb and transfered my MP3s to 
/mnt/usb/System/music/mp3 folder. That was easy.

2. Now, I need to run "yh-925-db-0.1.py" to update the database.

test:/mnt/usb# ls -l
total 64
drwxr-xr-x 3 root root 16384 2006-07-22 10:31 backup
drwxr-xr-x 8 root root 16384 2006-07-22 10:33 System
drwxr-xr-x 2 root root 16384 2002-01-01 11:00 tmp


test:/mnt/usb/System# ls -l
total 2480
drwxr-xr-x 2 root root 16384 2006-06-26 16:31 audible
drwxr-xr-x 2 root root 16384 2006-06-26 16:31 data
drwxr-xr-x 6 root root 16384 2006-06-26 16:31 music
drwxr-xr-x 2 root root 16384 2006-06-26 16:31 Parms
drwxr-xr-x 2 root root 16384 2006-06-26 16:31 playlist
-rwxr-xr-x 1 root root 2424832 2004-07-31 10:47 pp5020.mi4
drwxr-xr-x 2 root root 16384 2006-06-26 16:31 Recordings
-rwxr-xr-x 1 root root 7305 2006-07-22 10:34 yh-925-db-0.1.py


test:/mnt/usb/System# ./yh-925-db-0.1.py
Traceback (most recent call last):
File "./yh-925-db-0.1.py", line 195, in ?
de.add_from_dict(e.unpack3(f))
File "./yh-925-db-0.1.py", line 53, in unpack3
u = utf_16_le.decode(fp.read(size))
AttributeError: 'module' object has no attribute 'decode'

Any ideas? Thanks



More information about the Python-list mailing list