2004-04-13, 02:13
i had a quick look at the code that causes the typeerror exception to be raised. struct.unpack() returns a list instead of a scalar value. if you add [0] after each call to struct.unpack(), hopefully it will work.
i was fairly new to python when i ported the code in mysql.py from a perl module and didn't really test all scenarios as thoroughly as i would've liked. my main goal was to get database access working for what i needed.
given that all the struct.unpack calls were incorrect in that function, i wouldn't be surprised if you hit some other problems in the untested code. you can enable debug in the mysql module by adding "debug=1" to the parameter list when the mysql.connection() object is constructed in mytv.py.
let me know if you run into any other problems so i can fix the module...
i was fairly new to python when i ported the code in mysql.py from a perl module and didn't really test all scenarios as thoroughly as i would've liked. my main goal was to get database access working for what i needed.
given that all the struct.unpack calls were incorrect in that function, i wouldn't be surprised if you hit some other problems in the untested code. you can enable debug in the mysql module by adding "debug=1" to the parameter list when the mysql.connection() object is constructed in mytv.py.
let me know if you run into any other problems so i can fix the module...