Hi,
I’m attempting to get my initial plugin up and running and I’m running into a problem that looks like a problem importing the framework libraries.
Error:
Plugin.AddRequestHandler(FREECASTER_PREFIX, HandleVideosRequest, “Freecaster”, “icon-default.png”, “art-default.jpg”)
AttributeError: ‘module’ object has no attribute ‘AddRequestHandler’
and my imports are:
import re, string
from PMS import *
so, I’m not understanding something basic here. Pointers gratefully received.
thanks
Jonny
Hi Jonny, my guess is that the problem is the FREECASTER_PREFIX definition.
Please take a look at this little (not finished) tutorial: Here
I’ve been using the tutorial already, it’s been very useful, thanks.
My current code is very simple and I’m sure I’m missing something trivial but not obvious (to me) but the PREFIX looks fine. Here’s the whole code:
import re, string
from PMS import *
FREECASTER_PREFIX = “/video/freecaster”
FREECASTER_URL = “http://www.freecaster.tv/”
################################################################################
####################
def Start():
Plugin.AddRequestHandler(FREECASTER_PREFIX, HandleVideosRequest, “Freecaster”, “icon-default.png”, “art-default.jpg”)
################################################################################
####################
def HandleVideosRequest(pathNouns, count):
dir = MediaContainer(“art-default.jpg”, None, “Freecaster”)
return dir.ToXML()
As you can see, as a first step I’m just trying to get the entry in the videos section but without any actual content, but I’m getting the exception mentioned.
thanks
Jonny
Which framework version are you targetting? The code posted above should work for v0.
I’m targetting v1, and that’s what is specified in the plist file.
Sounds like you are saying I have v0 specific code. I could have sworn the example I was using as a jumping off point was a v1 pluging, but I’ll double check tonight. Thanks.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.