2010-10-27, 13:07
I was trying to import from my own folder, and it did not wish to work...
Traceback:
Here is the Code of default.py:
and testAPI\common.py
Source (Packaged for dharma): Direct Download
This does indeed work 100% fine as a Video Addon, but seemingly not as Audio? Could someone tell me they get the same issue, and/or how to fix it? (other than not using the API folder).
Thanks
Traceback:
Code:
ERROR: Traceback (most recent call last):
File "C:\Program Files\XBMC\portable_data\addons\plugin.audio.test\default.py", line 4, in ?
from testAPI import common as common
ImportError: No module named testAPI
Here is the Code of default.py:
Code:
#Blah
# Custom Libraries
from testAPI import common as common
#import common
# Static Libraries
import os,sys,time
import urllib,urllib2,re
import xbmc,xbmcplugin,xbmcgui,xbmcaddon
# plugin Constants
__plugin__ = "Test"
__author__ = "Insayne"
__url__ = ""
__svn_url__ = ""
__version__ = "0.1"
__svn_revision__ = "$Revision$"
__XBMC_Revision__ = xbmc.getInfoLabel('System.BuildVersion')
__settings__ = xbmcaddon.Addon(id='plugin.audio.hvsc')
print " I could be initialized"
# Lets try to tell a joke!
common.silly()
xbmcplugin.endOfDirectory(int(sys.argv[1]))
and testAPI\common.py
Code:
# Common.py
import os, time
import urllib,urllib2,re,httplib
import xbmc,xbmcaddon, xbmcgui
def silly():
print "Some coders don't need an obfuscator, they are the obfuscator."
Source (Packaged for dharma): Direct Download
This does indeed work 100% fine as a Video Addon, but seemingly not as Audio? Could someone tell me they get the same issue, and/or how to fix it? (other than not using the API folder).
Thanks