Posts: 14
Joined: Dec 2014
Reputation:
0
I'm working on an addon for retrieving streams from a website.
I've tested the addon on a Raspberry P (OpenElec 5)i with no problems.
After testing the addon on Kodi on an Android device I get the error "No module importlib" on the import importlib statement.
Anybody know why I get the error?
What are the differences between these devices and do we need to consider anything when developing addons?
Posts: 2,127
Joined: Jan 2015
Reputation:
60
Razze
Team-Kodi Member
Posts: 2,127
2015-02-12, 12:35
(This post was last modified: 2015-02-12, 12:37 by Razze.)
Have you installed by zip or via copying?
If you use zip, kodi will look up the dependencies (addon.xml) and pull these from the repo
If you copy it, you will have to install the dependencies by yourself
And as far as I know android is on an older python version (I think 2.6) so you can't use the newest fancy commands of anything newer
Posts: 14
Joined: Dec 2014
Reputation:
0
I've installed by zip. As far as I know importlib should be standard in python. I've replaced the code with __import__ but haven't been able to test it because I've bumped on another error. Something about syntax error on a "with" statement.
Do you know hat python version Android is using? I didn't know each OS can have a different python version. I thought it was Kodi version dependent.
Posts: 268
Joined: Sep 2014
Reputation:
6
menakite
Retired Team-Kodi Member
Posts: 268
All official builds have Python 2.6 - people usually use these builds (on Linux 2.7 is much more common instead, as the maintainer usually links against the system's Python). importlib is new in 2.7.
Posts: 17,859
Joined: Jul 2011
Reputation:
371
Windows is officially 2.7.6
Posts: 7,650
Joined: Jun 2011
Reputation:
287
note that we bumped python to 2.7 in krypton for all platforms.