• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 39
Python and MythTV (a MythTV Front-End)
#46
i'm still not able to run the mytv.py script... it just hangs xbmc. however i still 'can' run mytvsettings.py just fine. i've upgraded to xbmc cvs 5/9, and am still using v0.6 of the scripts.

any idea what could be wrong?

what is this 'tdata' directory thing? i've never heard of that... where is it?

thanks,

tim
Reply
#47
howdy
0.7 works really nice for me except a little thing.
it seems it badly displays non ascii strings
like éàè that are translated to 2 symbols (bad utf8 handling ?)
Reply
#48
(jswu @ may 13 2004,18:26 Wrote:i did find a possible bug. if i select a show from my remote control and select it again before the show details screen comes up, i get an "invalid literal for init(): ok" error. after that happens, i get errors for anything that i select.
yep, i have fixed it in cvs but haven't made a new release yet. the problem stems from the fact that onaction() and oncontrol() callbacks are threaded and if you store anything on the stack, it can become outdated very quickly. i'll try to put together a new release shortly...
Quote:what is this 'tdata' directory thing? i've never heard of that... where is it?
the e:\tdata\0face008 directory stores xbmc settings. sometimes if you don't delete this directory when upgrading, it causes xbmc to hang or behave erratically. the last known build to work with the xbmc mythtv scripts is 4/27. i haven't had time to test a newer upgrade so if someone else has, please post about it.
Quote:it seems it badly displays non ascii strings
like éàè that are translated to 2 symbols (bad utf8 handling ?)
hmmm... as far as i can tell, the font displays those characters as a big square. even '*' doesn't render nicely. i think all that is needed is a replacement font... but i could be mistaken. darkie, is there something i can do in the script to fix this?
Reply
#49
fyi... i have just put up xbmc_mythtv-0.8.tar.bz2.
Reply
#50
Quote:hmmm... as far as i can tell, the font displays those characters as a big square. even '*' doesn't render nicely. i think all that is needed is a replacement font... but i could be mistaken. darkie, is there something i can do in the script to fix this?
all xbmc labels (buttons / lists/ etc) in python support both normal strings and unicode strings. so the best way is to convert from utf-8 to unicode and use that unicode string
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#51
alright.. easier said than done. Smile

i looked into it a bit but haven't had much luck yet. the mythtv database is supposedly using the latin1 character set. when i select values in the database using the mysql client, i see values like:

tã©lã©journal

from that value, the mythweb module gets the following:

téléjournal

so apparently mysql is storing the value correctly... when i retrieve the value in python and print it out, i get the first value - not the second. how do i convert it so that python will output it correctly? i tried using the unicode() function to convert the string but kept getting exceptions that the ordinal is not in range... anyone else figured this out?

edit: it appears that mysql prefixes "special characters" with \xc3 when sending them over the network. i put in a hack for now to strip the character and convert the character after it appropriately and it seems to work for the data i have in my myth database. i'm thinking the proper solution is to change the database to store everything in unicode so that when it is retrieved over the network, everything is sent in unicode. i'm not sure the supporting tools to fill the myth database work with unicode even... so for now this'll have to do until i can confirm the correct way to fix this.
Reply
#52
thanks, will give it a spin tomorrow Smile
Reply
#53
fyi... those of you wanting to try out the xbmc mythtv python scripts with the latest cvs build, i just installed the 2004-05-15 cvs build and everything seems to be working fine.
Reply
#54
just tried it
display is fine
thanks a bunch Smile
Reply
#55
(madtw @ may 16 2004,00:11 Wrote:i see values like:

tã©lã©journal

from that value, the mythweb module gets the following:

téléjournal

how do i convert it so that python will output it correctly? i tried using the unicode() function to convert the string but kept getting exceptions that the ordinal is not in range... anyone else figured this out?
madtw, mysql stores 'special chars' afaik in utf-8 format. to get the correct string in python you should use

unicode (thestring, 'utf-8')
Reply
#56
i just tried xbox-myth 0.9 with the 2004-05-15 build of xbmc. when i access the recorded shows everything freezes. here is what i see in the xmbc log:

Quote:17-05-2004 10:43:19 q:\scripts\mytv.py:1: deprecationwarning: non-ascii character '\xa1' in file q:\python\lib\gui.py on line 456, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
 import gui, nmb
17-05-2004 10:43:20 q:\python\lib\smb.py:94: futurewarning: hex/oct constants > sys.maxint will return positive values in python 2.4 and up
 sv_type_domain_enum     = 0x80000000
17-05-2004 10:43:20 q:\python\lib\smb.py:315: futurewarning: hex/oct constants > sys.maxint will return positive values in python 2.4 and up
 cap_extended_security = 0x80000000
17-05-2004 10:43:20 q:\python\lib\smb.py:621: futurewarning: hex/oct constants > sys.maxint will return positive values in python 2.4 and up
 if server_flags & 0x80000000:
Reply
#57
Quote:madtw, mysql stores 'special chars' afaik in utf-8 format. to get the correct string in python you should use

unicode (thestring, 'utf-8')

i already tried this before posting about it above. apparently it is not utf-8 because exceptions are raised by python. the 'ã' character causes an exception to be raised.

anyway, the solution i have in place seems to be working... thanks for the suggestion though.

(jswu @ may 17 2004 11:48 Wrote:i just tried xbox-myth 0.9 with the 2004-05-15 build of xbmc. when i access the recorded shows everything freezes.

apparently, you are not running xbmc_mythtv-0.9 because the deprecation warning was fixed in that version by adding the following comment at the top of the gui.py source file:

Quote:# -*- coding: iso-8859-1 -*-

the warning is about some characters that are in comments. you can delete the offending lines or add the comment above to silence python. since you are still getting that warning, i don't think you installed everything correctly or you installed an old version or you didn't reboot xbmc after installing the latest version.

i get the future warnings as well... i did not write smb.py and i'm not sure what the correct fix is until python 2.4 comes along so that is why they are still in the source. to be honest, i haven't spent any time looking at it because the module works despite the future warning in that module... in fact, i'm not convinced that those warnings will cause problems even in python 2.4 since the functions that use those constants aren't used for playback or for copying a smb file.

a friend was having similar problems as you and i am still trying to figure out how to fix his install. my install of build 2004-05-15 by untermensch works fine. you might want to look into why you are getting warnings when you shouldn't... and verify that you are using the same build or maybe newer.
Reply
#58
(madtw @ may 18 2004,00:03 Wrote:a friend was having similar problems as you and i am still trying to figure out how to fix his install.  my install of build 2004-05-15 by untermensch works fine.  you might want to look into why you are getting warnings when you shouldn't... and verify that you are using the same build or maybe newer.
sorry, i had tried versions 0.7 thru 0.9 with the 2004-05-15 build i had. the log was probably from a pre-0.9 version. none of the versions worked with the 2004-05-15 build i had, so i think the xbmc build was probably bad.

anyway, i just tried 0.9 with the 2004-05-18 build and everything is working fine now. great job.
Reply
#59
here's the error i get now. it says (running) for a second next to the script. i unrared python.rar into my xbmc/python directory. xbmc is my main frontend so it's on my c:\. any ideas?

18-05-2004 23:52:48 traceback (most recent call last):
18-05-2004 23:52:48 file "q:\scripts\mytvsettings.py", line 1, in ?
18-05-2004 23:52:48
18-05-2004 23:52:48 import gui
18-05-2004 23:52:48 systemerror
18-05-2004 23:52:48 :
18-05-2004 23:52:48 null result without error in pyobject_call
18-05-2004 23:52:48
Reply
#60
i'm still having troubles getting these scripts to run with any of the xbmc versions i have. i can get the settings script to run without a problem, but all other scripts terminate immediately except for the mytv.py script which simply hangs xbmc.

i have a feeling this is because the builds i'm getting don't have the python directory and i'm using an older version of the files in the python directory (from a 4/23 build). do i need to somehow find a xbmc build that distributes the python stuff as well? if anyone could pm me where to find such a thing i would be very greatful. this is driving me nuts.

tim
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 39

Logout Mark Read Team Forum Stats Members Help
Python and MythTV (a MythTV Front-End)0