Problem with own Python Scripts
#1
The following code doesn't work:
Code:
import sys, xbmc
#print xbmc.executeJSONRPC(sys.argv[1])
help(xbmc)

tag = xbmc.Player().getMusicInfoTag()
artist = tag.getArtist()
title = tag.getTitle()
print "Playing: " + artist + " - " + title



Code:
root ~/downloads/myaddon # python test.py
Help on package xbmc:

NAME
xbmc

FILE
/usr/lib/python2.7/site-packages/xbmc/__init__.py

DESCRIPTION
# -*- coding: utf-8 -*-
# File intentionally left blank

PACKAGE CONTENTS
bt (package)
ps3 (package)
xbmcclient
zeroconf


Traceback (most recent call last):
File "test.py", line 5, in <module>
tag = xbmc.Player().getMusicInfoTag()
AttributeError: 'module' object has no attribute 'Player'


Any Ideas?
Reply
#2
you cannot import modules outside XBMC
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with own Python Scripts0