View Full Version : Plugin Problems on Babylon Beta 1
dj_gerbil
2009-04-26, 21:09
Hi there, I don't know if anyone can help me, but I've written a plugin that works great in Atlantis, but I've just tried it on Babylon and I keep getting errors. One error is 'Error: Picture: Error loading image 'special://home/plugins/tvcatchup/pics/bbc_one.jpg'' when it tries to add thumbnails to the links. The other is to do with urllib2.open. When I do file=('TestFile',mode='wb') it says 'IOError' invalid mode 'wb'. Any ideas please.
rwparris2
2009-04-27, 00:32
Can we see your code? It is hard to know what you're doing wrong without it.
dj_gerbil
2009-04-27, 01:07
The bit that's causing me problems is this req = urllib2.Request('http://www.tvcatchup.com/channels.php')
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
response = urllib2.urlopen(req)
link=response.read()
response.close()
channel=re.compile('<name>(.+?)</name>').findall(link)
chanlink=re.compile('<link>(.+?)</link>').findall(link)
thumbs=re.compile('<logo>http://www.tvcatchup.com/channels/(.+?)</logo>').findall(link)
for i in range(0, len(channel)):
if (sys.platform == 'win32'):
PicPath = ''.join(["c:\\program files\\xbmc\\plugins\\programs\\tvcatchup\\pics\\",thumbs[i]])
elif (sys.platform.startswith('linux')):
PicPath = ''.join(["/xbmc/plugins/programs/tvcatchup/pics/",thumbs[i]])
ThumbURL = ''.join(["http://www.tvcatchup.com/channels/",thumbs[i]])
ChannelNum = ''.join([str(i+1)," : ",channel[i]])
f = urllib2.urlopen(ThumbURL)
g = f.read()
file = open(PicPath, mode="wb")
file.write(g)
file.close()
addDir(ChannelNum,chanlink[i],3,PicPath)
Hope that helps.
dj_gerbil
2009-04-28, 13:30
Ok, Not to worry. It fixed itself ??? There seems to be a problem where by if you tell XBMC that you want the plugins folder under Documents and Settings\User\application data\XBMC you also have to have the plugin installed in the Program Files\XBMC\Plugins\ folder ??? I do have one other question though, Whats happening with the mms: handling? It seems to be broken altogether now? I've tried using the ITV Plugin and all I get is this: 'Playlist playback aborted'
and the log says
20:58:41 T:120 M:711147520 NOTICE: -->Python Interpreter Initialized<--
20:58:41 T:120 M:711147520 NOTICE:
20:58:44 T:120 M:708497408 NOTICE: Mode: 3
20:58:44 T:120 M:708497408 NOTICE:
20:58:44 T:120 M:708497408 NOTICE: URL: 39994
20:58:44 T:120 M:708497408 NOTICE:
20:58:44 T:120 M:708497408 NOTICE: Name: 60 Minute Makeover 2009-04-20. Designer John Amabile and team go to Duston, Northamptonshire, where Tracey wants to surprise her best friend Beki with a home makeover to say thank you for all Beki's support.
20:58:44 T:120 M:708497408 NOTICE:
20:58:44 T:120 M:708497408 NOTICE: Getting Videofiles: 39994
20:58:44 T:120 M:708497408 NOTICE:
20:58:56 T:144 M:708546560 NOTICE: DVDPlayer: Opening: mms://itvbrdbnd.wmod.llnwd.net/a1379/o21/ucontent/2009/4/20/1-4698-0275-a_3673_itv1_384_1_4.wmv?MSWMExt=.asf
20:58:56 T:144 M:708534272 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
20:58:56 T:580 M:708476928 NOTICE: Creating InputStream
20:59:07 T:580 M:692412416 NOTICE: Creating Demuxer
20:59:12 T:580 M:691490816 ERROR: CDVDDemuxFFmpeg::Open - Error, could not open file mms://itvbrdbnd.wmod.llnwd.net/a1379/o21/ucontent/2009/4/20/1-4698-0275-a_3673_itv1_384_1_4.wmv?MSWMExt=.asf
20:59:12 T:580 M:691486720 ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer
20:59:12 T:580 M:691486720 NOTICE: CDVDPlayer::OnExit()
20:59:12 T:580 M:691486720 NOTICE: CDVDPlayer::OnExit() deleting input stream
20:59:12 T:144 M:707358720 ERROR: Playlist Player: skipping unplayable item: 0, path [mms://itvbrdbnd.wmod.llnwd.net/a1379/o21/ucontent/2009/4/20/1-4698-0275-a_3673_itv1_384_1_4.wmv?MSWMExt=.asf]
20:59:18 T:144 M:707440640 NOTICE: DVDPlayer: Opening: mms://itvbrdbnd.wmod.llnwd.net/a1379/o21/ucontent/2009/4/20/1-4698-0275-a_3673_itv1_384_2_4.wmv?MSWMExt=.asf
20:59:18 T:144 M:707440640 NOTICE: CDVDPlayer::CloseFile()
20:59:18 T:144 M:707440640 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
20:59:18 T:144 M:707440640 NOTICE: DVDPlayer: waiting for threads to exit
20:59:18 T:144 M:707440640 NOTICE: DVDPlayer: finished waiting
20:59:19 T:144 M:705867776 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
20:59:19 T:672 M:705818624 NOTICE: Creating InputStream
20:59:30 T:672 M:690561024 NOTICE: Creating Demuxer
20:59:34 T:672 M:690360320 ERROR: CDVDDemuxFFmpeg::Open - Error, could not open file mms://itvbrdbnd.wmod.llnwd.net/a1379/o21/ucontent/2009/4/20/1-4698-0275-a_3673_itv1_384_2_4.wmv?MSWMExt=.asf
20:59:34 T:672 M:690360320 ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer
20:59:34 T:672 M:690360320 NOTICE: CDVDPlayer::OnExit()
20:59:34 T:672 M:690360320 NOTICE: CDVDPlayer::OnExit() deleting input stream
20:59:35 T:144 M:706232320 ERROR: Playlist Player: skipping unplayable item: 1, path [mms://itvbrdbnd.wmod.llnwd.net/a1379/o21/ucontent/2009/4/20/1-4698-0275-a_3673_itv1_384_2_4.wmv?MSWMExt=.asf]
21:00:08 T:120 M:709439488 ERROR: DIRECTORY::CPluginDirectory::EndOfDirectory - called with an invalid handle.
21:00:08 T:144 M:709341184 NOTICE: CDVDPlayer::CloseFile()
21:00:08 T:144 M:709341184 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
21:00:08 T:144 M:709341184 NOTICE: DVDPlayer: waiting for threads to exit
21:00:08 T:144 M:709341184 NOTICE: DVDPlayer: finished waiting
Any idea's please?