Python and MythTV (a MythTV Front-End) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: Python and MythTV (a MythTV Front-End) (/showthread.php?tid=2349) |
- jpf - 2005-04-21 (madtw @ april 21 2005,15:40 Wrote:first comment is that you probably should try a newer version of xbmc. there have been a bunch of changes (including bug fixes) to the xbmc python module in early april.hi, ok well basically the newer versions of xbmc have horrible bugs, the mplayer window shows a black screen sometimes amongst other random problems. when i can't exit the screens, basically i can still use all the menus in the screen i'm stuck in. the main screen that freezes is the recordedshowdetails screen, but the livetv screen does that periodically as well. i also was having problems with connections freezing, and when i killed the mythbackend then i magically got control of the menus again, so i changed the socket to a timeoutsocket, put a default of 20 seconds in there, i haven't had a freeze like that since. also, why was the "back" button disabled? i reenabled it here: # stop user from quitting selecting parent dir in main window if action == mythtvgui.action_parent_dir: actionconsumed = none maybe the back button will work even if the "menu" button doesn't, but maybe there is something i'm not aware of. here is the change i made to def connect() def connect( self ): s = timeoutsocket.socket( socket.af_inet, socket.sock_stream ) timeoutsocket.setdefaultsockettimeout(20); with regards to the last error, i've seen it a few times. i am still able to exit onto the main menu and then everything seems fine. why is the program referencing a window id of -10000? that happens every time i can't exit the menu and am trying to by pressing the "menu" key. it would probably be good to add code to recreate any connection that fails (connection reset by peer is an error i see sometimes), as well as recreate the player object if it does not exist. - jpf - 2005-04-21 (jpf @ april 21 2005,16:47 Wrote:could you point me towards a xbmc-cvs build that actually works? and to a location. the primary -my mom- mirror only has a build since 2005-04-01(madtw @ april 21 2005,15:40 Wrote:first comment is that you probably should try a newer version of xbmc. there have been a bunch of changes (including bug fixes) to the xbmc python module in early april.hi, - jpf - 2005-04-21 (jpf @ april 21 2005,17:05 Wrote:i've upgraded to cvs 2005-04-10(jpf @ april 21 2005,16:47 Wrote:could you point me towards a xbmc-cvs build that actually works? and to a location. the primary -my mom- mirror only has a build since 2005-04-01(madtw @ april 21 2005,15:40 Wrote:first comment is that you probably should try a newer version of xbmc. there have been a bunch of changes (including bug fixes) to the xbmc python module in early april.hi, now i'm getting this: 21-04-2005 17:17:57 info traceback (most recent call last): 21-04-2005 17:17:57 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvmain.py", line 60, in oncontrol 21-04-2005 17:17:57 info mythtvguide.showwindow() 21-04-2005 17:17:57 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvguide.py", line 30, in showwindow 21-04-2005 17:17:57 info win.loadguide() 21-04-2005 17:17:57 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvguide.py", line 467, in loadguide 21-04-2005 17:17:57 info self.channels[self.endchan].chanid() ) 21-04-2005 17:17:57 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtv.py", line 728, in getprogramlistings 21-04-2005 17:17:57 info for row in rowiter: 21-04-2005 17:17:57 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 707, in next 21-04-2005 17:17:57 info return self.fetchrowasdict 21-04-2005 17:17:57 info value = self.getstringandseekpos 21-04-2005 17:17:57 info length = self.getfieldlength 21-04-2005 17:17:57 info head = ord( self.msg[self.position] ) 21-04-2005 17:17:57 info indexerror: string index out of range 21-04-2005 17:18:00 debug loadlibrarya('unicodedata.pyd') 21-04-2005 17:18:00 debug initializing fs_seg.. 21-04-2005 17:18:00 debug fs segment @ 0xa322e0 21-04-2005 17:18:00 debug executing entrypoint at: 0x1f425bb - dll: unicodedata.pyd 21-04-2005 17:18:00 debug loadlibrary('unicodedata.pyd') returning: 0xa56610 21-04-2005 17:18:00 debug kernel32!getprocaddress(0xa56610, 'initunicodedata') => 0x1f424b0 21-04-2005 17:18:01 info traceback (most recent call last): 21-04-2005 17:18:01 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtv.py", line 1385, in refresh 21-04-2005 17:18:01 info self.dom = minidom.parsestring( statushtml ) 21-04-2005 17:18:01 info file "q:\python\lib\_xmlplus\dom\minidom.py", line 1929, in parsestring 21-04-2005 17:18:01 info return expatbuilder.parsestring(string) 21-04-2005 17:18:01 info file "q:\python\lib\_xmlplus\dom\expatbuilder.py", line 940, in parsestring 21-04-2005 17:18:01 info return builder.parsestring(string) 21-04-2005 17:18:01 info file "q:\python\lib\_xmlplus\dom\expatbuilder.py", line 223, in parsestring 21-04-2005 17:18:01 info parser.parse(string, true) 21-04-2005 17:18:01 info expaterror: not well-formed (invalid token): line 17, column 7 21-04-2005 17:18:01 info activating window id: 13003 21-04-2005 17:18:02 info activating window id: 13002 21-04-2005 17:18:03 info traceback (most recent call last): 21-04-2005 17:18:03 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvmain.py", line 60, in oncontrol 21-04-2005 17:18:03 info mythtvguide.showwindow() 21-04-2005 17:18:03 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvguide.py", line 30, in showwindow 21-04-2005 17:18:03 info win.loadguide() 21-04-2005 17:18:03 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvguide.py", line 457, in loadguide 21-04-2005 17:18:03 info self.channels = db.getchannellist() 21-04-2005 17:18:03 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtv.py", line 627, in getchannellist 21-04-2005 17:18:03 info rowiter = self.conn.dictrowiterator() 21-04-2005 17:18:03 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 516, in dictrowiterator 21-04-2005 17:18:03 info iter.parse() 21-04-2005 17:18:03 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 684, in parse 21-04-2005 17:18:03 info self.getcolumnnames 21-04-2005 17:18:03 info self.columns.append( 21-04-2005 17:18:03 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 654, in getfieldlength() 21-04-2005 17:18:03 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 622, in data[ "program.starttime" ] 21-04-2005 17:19:37 info keyerror: 'program.starttime' 21-04-2005 17:19:38 info traceback (most recent call last): 21-04-2005 17:19:38 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvmain.py", line 60, in oncontrol 21-04-2005 17:19:38 info mythtvguide.showwindow() 21-04-2005 17:19:38 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvguide.py", line 30, in showwindow 21-04-2005 17:19:38 info win.loadguide() 21-04-2005 17:19:38 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvguide.py", line 457, in loadguide 21-04-2005 17:19:38 info self.channels = db.getchannellist() 21-04-2005 17:19:38 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtv.py", line 629, in getchannellist 21-04-2005 17:19:38 info for row in rowiter: 21-04-2005 17:19:38 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 707, in next 21-04-2005 17:19:38 info return self.fetchrowasdict 21-04-2005 17:19:38 info value = self.getstringandseekpos 21-04-2005 17:19:38 info length = self.getfieldlength 21-04-2005 17:19:38 info head = ord( self.msg[self.position] ) 21-04-2005 17:19:38 info indexerror: string index out of range 21-04-2005 17:19:40 info traceback (most recent call last): 21-04-2005 17:19:40 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvmain.py", line 60, in oncontrol 21-04-2005 17:19:40 info mythtvguide.showwindow() 21-04-2005 17:19:40 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvguide.py", line 30, in showwindow 21-04-2005 17:19:40 info win.loadguide() 21-04-2005 17:19:40 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvguide.py", line 457, in loadguide 21-04-2005 17:19:40 info self.channels = db.getchannellist() 21-04-2005 17:19:40 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtv.py", line 627, in getchannellist 21-04-2005 17:19:40 info rowiter = self.conn.dictrowiterator() 21-04-2005 17:19:40 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 516, in dictrowiterator 21-04-2005 17:19:40 info iter.parse() 21-04-2005 17:19:40 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 684, in parse 21-04-2005 17:19:40 info self.getcolumnnames 21-04-2005 17:19:40 info self.columns.append( 21-04-2005 17:19:40 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 654, in getfieldlength() 21-04-2005 17:19:40 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 622, in data[ "program.starttime" ] 21-04-2005 17:19:41 info keyerror: 'program.starttime' 21-04-2005 17:19:43 info traceback (most recent call last): 21-04-2005 17:19:43 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvmain.py", line 60, in oncontrol 21-04-2005 17:19:43 info mythtvguide.showwindow() 21-04-2005 17:19:43 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvguide.py", line 30, in showwindow 21-04-2005 17:19:43 info win.loadguide() 21-04-2005 17:19:43 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtvguide.py", line 457, in loadguide 21-04-2005 17:19:43 info self.channels = db.getchannellist() 21-04-2005 17:19:43 info file "e:\apps\xbmc\scripts\xbmcmythtv\mythtv.py", line 629, in getchannellist 21-04-2005 17:19:43 info for row in rowiter: 21-04-2005 17:19:43 info file "e:\apps\xbmc\scripts\xbmcmythtv\mysql.py", line 707, in next 21-04-2005 17:19:43 info return self.fetchrowasdict 21-04-2005 17:19:43 info value = self.getstringandseekpos 21-04-2005 17:19:43 info length = self.getfieldlength 21-04-2005 17:19:43 info head = ord( self.msg[self.position] ) 21-04-2005 17:19:43 info indexerror: string index out of range - henk - 2005-04-21 (madtw @ april 21 2005,04:01 Wrote:luigi: henk says your guide problem is fixed with my latest patches in the xbmcmythtv cvs repository.the guide is fixed now but probably broke livetv 21-04-2005 22:45:35 info traceback (most recent call last): 21-04-2005 22:45:35 debug udpclient rx: 16856 <- 'kai_client_arena_ping;(a)(i)crow;30;2;1;03;' 21-04-2005 22:45:35 info file "q:\scripts\xbmcmythtv\mythtvmain.py", line 56, in oncontrol 21-04-2005 22:45:35 info mythtvlivetv.showwindow(); 21-04-2005 22:45:35 info file "q:\scripts\xbmcmythtv\mythtvlivetv.py", line 56, in showwindow 21-04-2005 22:45:35 info win.loadprograms() 21-04-2005 22:45:35 info file "q:\scripts\xbmcmythtv\mythtvlivetv.py", line 140, in loadprograms 21-04-2005 22:45:35 info channellistcontrol.additem( 21-04-2005 22:45:35 info file\ "q:\scripts\xbmcmythtv\mythtvprogram.py", line 104, in formattedchannel 21-04-2005 22:45:35 info value += " " + self.callsign() 21-04-2005 22:45:35 info typeerror: unsupported operand type(s) for +=: 'nonetype' and 'str' - madtw - 2005-04-22 henk: try the latest cvs... jpf: i intentionally made it so that the back & menu buttons work for subscreens but the menu button only works for the main screen. it is mainly so that you don't ditch out of the script unintentionally... i use the back button when closing subscreens and then hit the menu button when i truly want to quit the script from the main screen. to each his own i guess... the timeout on the socket is a good idea.. i originally had the timeout coded when i was testing in linux but python in xbmc didn't like the code. in the end i ended up ripping it out. now that you've figured out the magic incantantation, i can put the socket timeout code back in... when i couldn't exit the screens a while ago, i tried using other actions besides the back and menu buttons but it did not work. the more i read about your debugging, the more i think this might be a threading issue... one thread is blocked on a socket and the other thread requests the window be closed. since there are still pending events on the window, it isn't entirely freed up but new events cannot be created because the window id is no longer valid? the -10000 window id is something xbmc assigns to new python windows... i haven't hard coded any ids into the scripts. if you take a look at mythtvguide.py, you can see how i restricted threaded events from modifying the screen at the same time. you could try adding in similar code into the screens that are causing problems to see if it helps... start at line 489. as for recreating connections... with some quick calls to test if a connection is still valid, it should be possible to add in recreating a dead connection into the getinstance calls that retrieve a connection/database object. at the moment, i try to hang on to connections for as short a time as possible but there is no retry. this has been working well for me so far but i must not be getting any timeouts on my connections. i'm not sure what the problem is with your last mysql error... i haven't touched that module in a long time. what version of mysql are you using? i'm running version 4.0.23... if you're running a newer version it could be that something has changed breaking mysql.py. - henk - 2005-04-22 (madtw @ april 22 2005,06:23 Wrote:henk: try the latest cvs...the error was on the latest cvs - henk - 2005-04-22 (henk @ april 22 2005,07:33 Wrote:ok, now it's :fixed:(madtw @ april 22 2005,06:23 Wrote:henk: try the latest cvs...the error was on the latest cvs - jpf - 2005-04-22 (madtw @ april 22 2005,06:23 Wrote:henk: try the latest cvs...hi, ok well, the thing is that the screens don't freeze. i just can't exit them. for example in the recorded movies screen, i often get stuck in the preview window. i can play the movie from there, i can delete and copy etc. i just can't exit it. can we put an emergency exit key in there? is there some special way that the program needs to be killed completely? - scottymac - 2005-04-23 we all seem to be constantly "chasing the tail" of others' projects here. why don't we all get the same version of xbmc, stable version 0.16 or 0.17 of myth and same version of xbmcmyth and get it working 100%. then move on to the next version/release whenever there is a need (feature enhancement/new stable release etc.).. we seem to be always constantly trying to hit a moving target. i have tried upgrading on and off for the last 3-4 months but there is always some incompatibility issues with at least one of the packages.. any thoughts ? - madtw - 2005-04-23 (jpf @ april 22 2005,13:10 Wrote:ok well, the thing is that the screens don't freeze. i just can't exit them. for example in the recorded movies screen, i often get stuck in the preview window. i can play the movie from there, i can delete and copy etc. i just can't exit it. can we put an emergency exit key in there? is there some special way that the program needs to be killed completely?yeah, i know exactly what you're talking about. i haven't experienced it in a few months now. when i had the problem, i tried putting in emergency exit buttons, etc. to get around it. nothing worked... it seemed like python lost all concept of the window (as far as closing it goes) but the events in the window would still fire (e.g. pushing buttons, etc.). - jpf - 2005-04-23 (madtw @ april 23 2005,04:58 Wrote:what we need to figure out is how my setup differs from yours. do you try various cvs versions of xbmc? i have tried many versions and always have the same problem.(jpf @ april 22 2005,13:10 Wrote:ok well, the thing is that the screens don't freeze. i just can't exit them. for example in the recorded movies screen, i often get stuck in the preview window. i can play the movie from there, i can delete and copy etc. i just can't exit it. can we put an emergency exit key in there? is there some special way that the program needs to be killed completely?yeah, i know exactly what you're talking about. i haven't experienced it in a few months now. when i had the problem, i tried putting in emergency exit buttons, etc. to get around it. nothing worked... it seemed like python lost all concept of the window (as far as closing it goes) but the events in the window would still fire (e.g. pushing buttons, etc.). you are obviously always using the latest cvs so there shouldn't be a code difference there. i use international characters though, i wonder if that could have an effect? - jpf - 2005-04-23 (jpf @ april 23 2005,12:26 Wrote:one thing i noticed is that the status screen doesn't ever work, some error about not being able to parse, i see the expat parser errors in the log.(madtw @ april 23 2005,04:58 Wrote:what we need to figure out is how my setup differs from yours. do you try various cvs versions of xbmc? i have tried many versions and always have the same problem.(jpf @ april 22 2005,13:10 Wrote:ok well, the thing is that the screens don't freeze. i just can't exit them. for example in the recorded movies screen, i often get stuck in the preview window. i can play the movie from there, i can delete and copy etc. i just can't exit it. can we put an emergency exit key in there? is there some special way that the program needs to be killed completely?yeah, i know exactly what you're talking about. i haven't experienced it in a few months now. when i had the problem, i tried putting in emergency exit buttons, etc. to get around it. nothing worked... it seemed like python lost all concept of the window (as far as closing it goes) but the events in the window would still fire (e.g. pushing buttons, etc.). - Loto_Bak - 2005-04-24 just a fyi for everyone, mythtv .18, latest xbmc cvs is working 100% lan video cache set to 0 using mpeg-ps video recording profile. i do get slight video/audio studder every once and a while but its very minor the parsing of the status screen works perfectly with this combination. - lintweaker - 2005-04-24 mythtv 0.18 is working beautifully with the latest xbmcmythtv from cvs. i am using it with an "older" version of xmbc. newer versions have some anoying bugs. the only thing is that in the program guide shows with long names are overlapping. no biggy ... excellent stuff. :kickass: - jpf - 2005-04-25 (lintweaker @ april 24 2005,20:17 Wrote:mythtv 0.18 is working beautifully with the latest xbmcmythtv from cvs. i am using it with an "older" version of xmbc. newer versions have some anoying bugs.which version are you using? |