Project

General

Profile

Actions

Bug #292

closed

xbmc4xbox can not access Addons on the HomeScreen (+Fix)

Added by skatulskijean over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
12/03/2014
Due date:
% Done:

0%

Resolution:
invalid
Affected Version:

Description

When you add a addon to the Homesreen its give ever a error when you it run.
The Problem is that Line 59 on the scriptmodule.xbmcaddon /xbmcaddon.py
can not access the right Directory.

Fix :

change Line 59 on the xbmcaddon.py from:

base_path = os.path.dirname( xbmc.translatePath( cwd ) ) + os.sep

to:

base_path =os.path.dirname(os.path.abspath(xbmc.translatePath( cwd ) ) )+ os.sep

this will work:

Buzz i hope you can this change on the Sources for the next Build without Patch File.
With the next what i will fix i give a patch file.

Regards Jan


Files

xbmc.log (25 KB) xbmc.log skatulskijean, 23/03/2014 06:49 PM
Actions #1

Updated by buzz over 10 years ago

  • Status changed from New to Feedback
  • Assignee set to skatulskijean

would prefer a diff, but please detail what this patch does / why it is needed (with more details than it gives an error) - or an example so I can reproduce. thanks.

Actions #2

Updated by skatulskijean over 10 years ago

When you add a addon shortcut for exsample on skin confluenceLight (it#s on the other skins the same) the access from the addon on the homescreen give ever a error.
The only working solution momently is first start the addon from the plugin directory and than the shortcut is on the home screen from the skin is working .
But that is not nice .
Here a error example:

xbmcaddon start from confluencelight on the homescreen
21:07:18 M: 89513984 INFO: -->Python script returned the following error<--
21:07:18 M: 89513984 ERROR: Error Type: <type 'exceptions.WindowsError'>
21:07:18 M: 89513984 ERROR: Error Contents: (123, 'Windows Error 0x7B', '\\*.*')
21:07:18 M: 89509888 ERROR: Traceback (most recent call last):
File "Q:\plugins\video\TVShows\default.py", line 9, in <module>
addon = xbmcaddon.Addon(id='plugin.video.tvshowsXBMC$XBOX')
File "Q:\scripts\.modules\script.module.xbmcaddon\lib\xbmcaddon.py", line 60, in __init__
for directory in os.listdir(base_path):
WindowsError: (123, 'Windows Error 0x7B', '\\*.*')
21:07:18 M: 89509888 INFO: -->End of Python script error report<--

to fix that error we want the dirname of the absolute path:

and this works not with base_path = os.path.dirname( xbmc.translatePath( cwd ) ) + os.sep (that is solution what we have on the xbmcaddon.py on Line 59)

To get the dirname of the absolute path from a File so its: os.path.dirname(os.path.abspath(file)) working.

so the working solution for the xbmcaddon.py on Line 59 is:

base_path =os.path.dirname(os.path.abspath(xbmc.translatePath( cwd ) ) )+ os.sep

this fix the error.

I hope that is clean.

Regards Jan and thank for your work

Actions #3

Updated by buzz over 10 years ago

in your log code, you have a typo in the id $ instead of 4. you sure that isn't related? - asking because I was sure this was already fixed before by dan dar3

Actions #4

Updated by skatulskijean over 10 years ago

I understand that DanDar this have fixed before but this solution is on a clean installed 3.5 Beta Build not working .
So i have it fix again.

Regards Jan

Actions #5

Updated by buzz over 10 years ago

you didn't reply regarding the wrong id in the log. please show me it failing with the correct id.

Actions #6

Updated by buzz over 10 years ago

I would like to see a full debug log too so I can check the xbmcaddon search locations.

Actions #7

Updated by skatulskijean over 10 years ago

here a error from a other addon without the fix , it have nothing to do with the typo.

06:17:21 M: 89980928 INFO: -->Python script returned the following error<--
06:17:21 M: 89980928 ERROR: Error Type: <type 'exceptions.WindowsError'>
06:17:21 M: 89980928 ERROR: Error Contents: (123, 'Windows Error 0x7B', '\\*.*')
06:17:21 M: 89980928 ERROR: Traceback (most recent call last):
File "Q:\plugins\video\TV-SHOWS-LIVE\default.py", line 27, in <module>
addon = xbmcaddon.Addon(id='plugin.video.tvshowsLive')
File "Q:\scripts\.modules\script.module.xbmcaddon\lib\xbmcaddon.py", line 60, in __init__
for directory in os.listdir(base_path):
WindowsError: (123, 'Windows Error 0x7B', '\\*.*')
06:17:21 M: 89980928 INFO: -->End of Python script error report<--

with the fix it's working

Actions #8

Updated by buzz over 10 years ago

I would like to see a full log first please. as requested.

Actions #9

Updated by buzz over 10 years ago

your install location should also match the id. ie plugins/video/tvshowslive without the hyphens. and without any caps in the addon id.

Actions #10

Updated by skatulskijean over 10 years ago

Here is the full debug log sorry.

Actions #11

Updated by buzz over 10 years ago

I can see from the log the search locations fail, and so the last fallback stops working. the actual problem is

xbmcaddon: could not open Q:\plugins\video\tvshowsLive\addon.xml

and if that had worked I think it would have been ok. As I said, your install location should match the plugin id.

Actions #12

Updated by buzz over 10 years ago

please can you read my responses in full before replying, as I said about the install location in the previous post, and you posted a log without changing it first. This will save time, and make it easier to work out a solution.

Actions #13

Updated by skatulskijean over 10 years ago

i think i give it up.

What you think i#am a idiot and this for all working but not for me?
than its ok and its works for the other xbmc4xbox user not but for me.

Actions #14

Updated by buzz over 10 years ago

I am just asking for you to change the plugin folder name to match the id name before posting a log. If you are unwilling to do that, then I will not address this issue further. I recommend you get a different attitude if you want any help.

Actions #15

Updated by buzz over 10 years ago

  • Status changed from Feedback to Closed
  • Resolution set to invalid
Actions #16

Updated by byron over 10 years ago

If I might...I know this is closed but thought maybe this might shed some light (or not, hopefully not ruffling feathers). Quite some time ago I made my skin have the ability to automatically install shortcuts on the home-screen for addons, scripts, and favourites using the aid of python scripts. User opens the custom button dialog, chooses which of the three they want the button shortcut to be , and then selects the correct item from a list that is opened via (SelectDialog). Anyway, no fussing over manually adding paths...just selecting from a list is what I was getting at.

Here are the scripts:

HomePlugins.py ----- http://xbmclogs.com/show.php?id=159343
HomeScripts.py ----- http://xbmclogs.com/show.php?id=159344
Favourites.py ----- http://xbmclogs.com/show.php?id=159346

Here is an example of me setting 1Channel as a custom menu button (sorry my string labels are pretty lame but they work), and then accessing the shortcut from the submenu where it was installed which ultimately opens the plugin without a hitch...

http://xbmclogs.com/show.php?id=159349 (process starting on line 223)

Hope this might help in some way, and will add the code from Home.xml and Custom_SubMenu____Videos.xml if that might help illustrate a bit more. Basically I was just thinking that something in the scripts might translate to the cpp project for a more direct solution as the scripting workaround takes a decent amount of ram but does work 100%

Actions

Also available in: Atom PDF