I was hoping someone here could help me out. I am getting the following error in my log.
20:41:13 T:6820 M:2817478656 ERROR: Error Type: exceptions.ImportError
20:41:13 T:6820 M:2817478656 ERROR: Error Contents: No module named etree
20:41:13 T:6820 M:2817478656 ERROR: Traceback (most recent call last):
File "C:\Users\SkunKAdeliC\AppData\Roaming\XBMC\addons\plugin.video.rtmpGUI\default.py", line 8, in ?
from xml.etree import ElementTree
ImportError: No module named etree
20:41:13 T:6016 M:2817462272 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.rtmpGUI/
20:41:13 T:6016 M:2817462272 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.rtmpGUI/) failed
20:41:13 T:9900 M:2817462272 WARNING: XFILE::CFactoryDirectory::Create - Unsupported protocol(script) in script://
I have very limited programming skills. It says there is an error in line 8, but when I look at line 8, I honestly wouldn't know what that error is.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib, urllib2, cookielib
import string, os, re, time, datetime, sys
import xbmc, xbmcgui, xbmcplugin, xbmcaddon
from xml.etree import ElementTree
BASE = 'http://apps.ohlulz.com/rtmpgui/list.xml'
# Root listing
def listVideos():
xml=getURL(BASE)
tree = ElementTree.XML(xml)
streams = tree.findall('stream')
for stream in streams:
language = stream.findtext('language')
if language == 'English':
title = stream.findtext('title')+' ('+language+')'
rtmplink = stream.findtext('link')+' playpath='+stream.findtext('playpath')+' swfurl='+stream.findtext('swfUrl')+' pageurl='+stream.findtext('pageUrl')
item=xbmcgui.ListItem(title)
item.setInfo( type="Video", infoLabels={'title':title})
item.setProperty('IsPlayable', 'true')
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=rtmplink,listitem=item,isFolder=False)
xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ) )
def getURL( url ):
print 'RTMPGUI --> common :: getURL :: url = '+url
cj = cookielib.LWPCookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
opener.addheaders = [('User-Agent', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2')]
usock=opener.open(url)
response=usock.read()
usock.close()
return response
listVideos()
I also found this doing some research. It said to add this line
<import addon="script.module.elementtree"> under requires, in the addon.xml file. When I do that, the addon completely disappears from XBMC. It could be I am adding it in the wrong place, have the wrong syntax, etc. Or that it isn't a solution to my problem at all.
***EDIT***
I solved my own problem.
I found there was no "ETREE" directory, so I found the needed files, placed them, and all is working.
Thanks for this great addon!