No module named common.addon

icharania

New member
Jun 21, 2013
17
0
0
Hi guys, I'm hoping someone can help me out.

My addon was working fine up till the recent update to urlresolver. Now I keep getting "No module named common.addon" when calling any method from urlresolver.

Google searches have come up dry. They all just say to make sure urlresolver addon is up to date and that addon.common exists.

In my xbmc addons folder, I've got:
script.module.urlresolver: 2.3.0
script.module.addon.common: 2.0.1


My addon is PakTVForum, found in Fusion > World > icharania.repo
Source: https://github.com/irfancharania/plugin.video.paktvforum

For example, in the addon, clicking the "UrlResolver settings" will throw up the error.
(That just calls the display_settings() method)


Hoping someone can point out what I need to do to fix it.
Thanks!


Edit: I'm still on Frodo 12.3 on Windows 7 (if that makes a difference...)
 
Last edited:

Blazetamer

New member
Mar 3, 2013
564
0
0
The Yellow Brick Road
Use the Addon Installer to instal any adon that requires common.addon and the Addon Installer will "should" fix you up

"Cliq " ...one of my addons...requires it.. Try that one and see if the installer adds the common.addon module for you
 

Blazetamer

New member
Mar 3, 2013
564
0
0
The Yellow Brick Road
Just a thought , can you post a log? It has been brought to.my attention that some unsupported add-ons could be installing a "odd version" of resolver that "may or may not" be an issue. I have not seen this with my own eyes ... but it's a possibility that I am researching .
 

icharania

New member
Jun 21, 2013
17
0
0
log: http://xbmclogs.com/show.php?id=222813

I'd already downloaded it and added to my addons folder
script.module.urlresolver: 2.3.0
script.module.addon.common: 2.0.1


I installed Cliq, and it works just fine. I was able to play a movie.

When I open my addon and go to UrlResolver settings, still no go.

Would you try adding my addon and seeing if you get the same results as me?
Addon Installer > World > icharania.repo. Then try the PakTVForum video addon, then try to bring up the UrlResolver Settings...


I'll try to have another look at it later tonight, and I'll have to see how you're using it in Cliq

It seems odd because the UrlResolver and Addon.Common addons exist and are the latest version
and I've been using other addons that depend on them (e.g. ProjectFreeTV) without any issues for months...
 

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
Where did you get that version of addon.common? I haven't released this one yet where it logs the version #

Show us the code to how you are attempting to launch the urlresolver settings.. I've had to adjust a couple of my addons due to Gotham and using addon.common

Also, do you have urlresolver in a sub folder? "plugin://plugin.video.paktvforum/urlresolver/" I'm confused by some things going on in the log...

Btw, your log shows metahandler being loaded over and over again a good 30 times in a row.. you might want to look into cleaning that up
 

icharania

New member
Jun 21, 2013
17
0
0
Where did you get that version of addon.common? I haven't released this one yet where it logs the version #
I had the official Frodo one on my box initially, then tried replacing it with the one from your github.
Both have same results in my addon as of late, but other addons (like ProjectFreeTV) work just fine...
My addon used to work up till recently.


Show us the code to how you are attempting to launch the urlresolver settings.. I've had to adjust a couple of my addons due to Gotham and using addon.common
https://github.com/irfancharania/plugin.video.paktvforum/blob/master/addon.py#L205



Also, do you have urlresolver in a sub folder? "plugin://plugin.video.paktvforum/urlresolver/" I'm confused by some things going on in the log...
No. That's just the way the xbmcSwift2 framework works... (it's not relevant here)



Btw, your log shows metahandler being loaded over and over again a good 30 times in a row.. you might want to look into cleaning that up
I don't make use of metahandler addon...


That log shows the following steps:
1. Open XBMC and go to PakTVForum addon
2. Select UrlResolver Settings (fails)
3. Go to Cliq
4. Select xmen movie and play (works)
5. Stop and go to PakTVForum addon
6. Select UrlResolver Settings (fails)
 
Last edited:

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
No. That's just the way the xbmcSwift2 framework works... (it's not relevant here)

I don't make use of metahandler addon...


That log shows the following steps:
1. Open XBMC and go to PakTVForum addon
2. Select UrlResolver Settings (fails)
3. Go to Cliq
4. Select xmen movie and play (works)
5. Stop and go to PakTVForum addon
6. Select UrlResolver Settings (fails)
Maybe it is relevant? The code looks fine and is straight forward... though I'm not familiar with xbmcswift to comment at all

Do you have 1Ch**nel or PFTV installed? Check those addons and see if you can open Resolver Settings

The last update to urlresolver did change over to use addon.common, but so far all has seemed fine, apart from your addon of course.. so something must be up with how it's getting launched here, can't find the common library for some reason.. I'm assuming it still works for resolving links?

I'll go thru the urlresolver code to make sure nothing was missed...


As far as metahandler, you do notice that all the while you are browsing thru your addon that metahandlers is logging? I don't see any signs of what may be doing that.. very odd, but of course not related to this
 
Last edited:

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
So reading a bit closer, I think we were getting mixed up on the naming of these guys.. t0mm0.common was renamed to addon.common

But your log is complaining of missing common.addon which is...

In urlresolver there is common.py which loads some standard stuff, including initializing an object called 'addon' which to make it more confusing inherits the addon.common lib

So when you call urlresolver.display_settings() it's calling common.addon.display_settings()

It's tough to say, but I'm going to guess that it can't find the common.py.. which is odd

Did you try rolling ulresolver back to 2.2.0?

I have a feeling this is going to be a small stupid bug we overlooked...
 

icharania

New member
Jun 21, 2013
17
0
0
So reading a bit closer, I think we were getting mixed up on the naming of these guys.. t0mm0.common was renamed to addon.common

But your log is complaining of missing common.addon which is...

In urlresolver there is common.py which loads some standard stuff, including initializing an object called 'addon' which to make it more confusing inherits the addon.common lib

So when you call urlresolver.display_settings() it's calling common.addon.display_settings()

It's tough to say, but I'm going to guess that it can't find the common.py.. which is odd

Did you try rolling ulresolver back to 2.2.0?

I have a feeling this is going to be a small stupid bug we overlooked...

I think the metahandler is probably Cliq.
I will confirm when I get home tonight.

No, it's not just the display_settings... Nothing resolves anymore.
I was using the display_settings as an example cuz it's easy to get to.

(I will try calling resolversettings from another addon and see if that works though)

I'll try rolling back to old version. I suspect it will work just fine (because it used to :p)
 

icharania

New member
Jun 21, 2013
17
0
0
I still haven't rolled back, but here's an update.

1. The metahandler stuff is from Cliq

http://xbmclogs.com/show.php?id=223247

Log shows:
- open xbmc
- run ProjectFreeTV
- click Resolver Settings (works)
- run PakTVForum
- click Resolver Settings (fails)

2. I made a new tester addon using xbmcswift framework
(from running create to build the skeleton then added import urlresolver).

This shows the problem:
http://xbmclogs.com/show.php?id=223252
 

icharania

New member
Jun 21, 2013
17
0
0
I think it just dawned on me... It may be that the framework is looking for a folder called "addon" with a subfolder called "common" and failing because it's not there??

When in reality, that exists in script.module.addon.common\lib\addon\common

Is there a way to "hard-code" it so that you specify script.module.addon.common rather than just writing
from addon.common.addon import Addon


I may just be reaching here, dunno...
 
Last edited:

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
Hmmm.. looks like the two are possibly getting confused with each other with the naming

It was really suck for us to rename this guy again :) Can you try doing some changes in the common.py with how things are named there and see how it turns out?
 

icharania

New member
Jun 21, 2013
17
0
0
Yeah, I hear you...
(I haven't had time to keep up with all the developing changes or this would have come up in testing earlier)

I'll try tonight and see if I can come up with anything...
My python is not too good. Any pointers on what to google? ;)
 

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
I would open up common.py in urlresolver and change the object 'addon' to be named something else.. though 'addon' is probably used in quite a few places, so might be a pain trying to verify
 

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
How about a different angle, how does xbmcswift work? Basically what does it do for your addon? :)

Is it necessary to use at times when urlresolver is called?
 

icharania

New member
Jun 21, 2013
17
0
0
xbmcswift is a framework that handles all the routing, etc. It's the guts of the addon
All that manual work is done by the framework, and I mostly supply methods to scrape and play...

It makes creating an addon very easy

http://www.xbmcswift.com/en/latest/quickstart.html#hello-xbmc


** The other HUGE benefit it has over anything else is that you can build, run and test the addon via the command prompt instead of having to open up XBMC each time. (at least the parts that don't rely on an external library)

check it out! :D