Any and all problems related to Helix and possible runscript issues
#1
feed parser is installed, in the addon.xml, imported in python script... and works fine in Gotham....

But in Helix, I always get
Code:
19:59:31 T:10164   DEBUG: ADDON: cpluff: 'Plug-in script.module.feedparser has been installed.'
19:59:40 T:11184   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: No module named feedparser
                                            Traceback (most recent call last):
                                              File "D:\Kodi\portable_data\addons\script.pseudotv.live-master/pseudotv.py", line 36, in <module>
                                                import resources.lib.Overlay as Overlay
                                              File "D:\Kodi\portable_data\addons\script.pseudotv.live-master\resources\lib\Overlay.py", line 29, in <module>
                                                from EPGWindow import EPGWindow
                                              File "D:\Kodi\portable_data\addons\script.pseudotv.live-master\resources\lib\EPGWindow.py", line 27, in <module>
                                                from ChannelList import ChannelList
                                              File "D:\Kodi\portable_data\addons\script.pseudotv.live-master\resources\lib\ChannelList.py", line 25, in <module>
                                                import feedparser
                                            ImportError: No module named feedparser
                                            -->End of Python script error report<--
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#2
Post the complete log. You cut out right after the one useful line for debugging path problems!
Reply
#3
(2014-11-04, 13:09)takoi Wrote: Post the complete log. You cut out right after the one useful line for debugging path problems!

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

thanks
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#4
according to the log you do not appear to import the module in addon.xml - are you sure ? (post it please).
Reply
#5
(2014-11-04, 15:44)ironic_monkey Wrote: according to the log you do not appear to import the module in addon.xml - are you sure ? (post it please).

Its in there... the plugin works fine in gotham/frodo. When I installed the plugin in Helix, it properly found and downloaded the feedparser module.

https://github.com/Lunatixz/script.pseud...don.xml#L8
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#6
k. then takoi has some work to do Wink
Reply
#7
It imports fine when running the two entry point defined in addon.xml: service.py and default.py. What fails is CPythonInvoker 5 that runs the unknown entry point "pseudotv.py". I'm guessing you're calling RunScript or something with the path to this this file and not the addon id.
Reply
#8
(2014-11-04, 17:04)takoi Wrote: It imports fine when running the two entry point defined in addon.xml: service.py and default.py. What fails is CPythonInvoker 5 that runs the unknown entry point "pseudotv.py". I'm guessing you're calling RunScript or something with the path to this this file and not the addon id.

correct, I use Runscript...

https://github.com/Lunatixz/script.pseud...lt.py#L193

Is this not allowed anymore? I use Runscript in a number of places...

Thanks again.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#9
It wasn't an intentional change to forbid it, so I don't know yet. When you run an addon, you get the decencies for that addon. When you run a standalone script, you get a standalone script with no decencies imported. Make sense?

What I don't get is why would you not just do:
import pseudotv
pseudotv.whatever()

instead of "xbmc.executebuiltin('RunScript("' + __cwd__ + '/pseudotv.py' + '")')"
Reply
#10
(2014-11-04, 17:39)takoi Wrote: It wasn't an intentional change to forbid it, so I don't know yet. When you run an addon, you get the decencies for that addon. When you run a standalone script, you get a standalone script with no decencies imported. Make sense?

What I don't get is why would you not just do:
import pseudotv
pseudotv.whatever()

instead of "xbmc.executebuiltin('RunScript("' + __cwd__ + '/pseudotv.py' + '")')"

Do you think this will be fixed? I'm in no rush to add Helix support...

Thanks
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#11
(2014-11-04, 17:42)Lunatixz Wrote: Doesn't import trump everything including order of code and context?
Simply put: no. That being said, it's general a bad idea to put logic the global scope so that would matter. Sound dumb, but If you need to do stuff, make a function do_stuff and call it when stuff needs to be done! Don't use import for that
Reply
#12
(2014-11-04, 18:28)takoi Wrote:
(2014-11-04, 17:42)Lunatixz Wrote: Doesn't import trump everything including order of code and context?
Simply put: no. That being said, it's general a bad idea to put logic the global scope so that would matter. Sound dumb, but If you need to do stuff, make a function do_stuff and call it when stuff needs to be done! Don't use import for that

Looks like it might get fixed...

https://github.com/xbmc/xbmc/pull/5593

I'll wait for the fix, then I'll add helix support. I'm not interested in rewriting parts of my plugin, if this is a temp workaround.

Thanks again Smile
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#13
(2014-11-04, 18:52)Lunatixz Wrote:
(2014-11-04, 18:28)takoi Wrote:
(2014-11-04, 17:42)Lunatixz Wrote: Doesn't import trump everything including order of code and context?
Simply put: no. That being said, it's general a bad idea to put logic the global scope so that would matter. Sound dumb, but If you need to do stuff, make a function do_stuff and call it when stuff needs to be done! Don't use import for that

Looks like it might get fixed...

https://github.com/xbmc/xbmc/pull/5593

I'll wait for the fix, then I'll add helix support. I'm not interested in rewriting parts of my plugin, if this is a temp workaround.

Thanks again Smile

That's already in beta1
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
#14
(2014-11-04, 18:53)Martijn Wrote:
(2014-11-04, 18:52)Lunatixz Wrote:
(2014-11-04, 18:28)takoi Wrote: Simply put: no. That being said, it's general a bad idea to put logic the global scope so that would matter. Sound dumb, but If you need to do stuff, make a function do_stuff and call it when stuff needs to be done! Don't use import for that

Looks like it might get fixed...

https://github.com/xbmc/xbmc/pull/5593

I'll wait for the fix, then I'll add helix support. I'm not interested in rewriting parts of my plugin, if this is a temp workaround.

Thanks again Smile

That's already in beta1

ahh, so I guess it doesn't fix my problem...
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#15
(2014-11-04, 17:39)takoi Wrote: It wasn't an intentional change to forbid it, so I don't know yet. When you run an addon, you get the decencies for that addon. When you run a standalone script, you get a standalone script with no decencies imported. Make sense?

What I don't get is why would you not just do:
import pseudotv
pseudotv.whatever()

instead of "xbmc.executebuiltin('RunScript("' + __cwd__ + '/pseudotv.py' + '")')"
Since this might not get fixed... I'll make the changes...

I'll use your method, and remove the runscript... then call a function instead.

Thanks again
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply

Logout Mark Read Team Forum Stats Members Help
Any and all problems related to Helix and possible runscript issues0