[RELEASE] iPhoto Plugin Addon for XBMC

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
azeroth Offline
Junior Member
Posts: 6
Joined: Apr 2011
Reputation: 0
Post: #41
It was my iPhoto library. I updated it with the newer computer and all is well. Sorry for the post! Thanks for the plugin!!!

Now I just have to find a newer iLife for my computer that I normally use with iPhoto lol

Thanks again!
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #42
azeroth Wrote:It was my iPhoto library. I updated it with the newer computer and all is well. Sorry for the post! Thanks for the plugin!!!

Now I just have to find a newer iLife for my computer that I normally use with iPhoto lol

Thanks again!

Oh, good. I was just going to reply to you that your log looked like it wasn't actually importing Tongue

Out of curiosity, what version of iPhoto/iLife were you using when it failed?

-j
find quote
GGet Offline
Junior Member
Posts: 10
Joined: Jun 2011
Reputation: 0
Post: #43
I'm running into the error "Script failed: addon.py"

Below is the (what I think is) relevant lines from the log file
Code:
22:34:30 T:2942024560 M:538214400   DEBUG: StartScript - calling plugin iPhoto('plugin://plugin.image.iphoto/','0','')
22:34:30 T:2942024560 M:538214400    INFO: initializing python engine.
22:34:30 T:2942024560 M:538214400   DEBUG: Loading: /usr/lib/xbmc/system/python/python24-i486-linux.so
22:34:30 T:2942024560 M:538157056   DEBUG: Python wrapper library linked with internal Python library
22:34:31 T:2942024560 M:538042368   DEBUG: new python thread created. id=2
22:34:31 T:2942024560 M:538042368   DEBUG: WaitOnScriptResult - waiting on the iPhoto plugin...
22:34:31 T:2933631856 M:538042368   DEBUG: thread start, auto delete: 0
22:34:31 T:2933631856 M:538042368   DEBUG: Python thread: start processing
22:34:31 T:2933631856 M:537915392  NOTICE: -->Python Interpreter Initialized<--
22:34:31 T:2933631856 M:537915392   DEBUG: Process - The source file to load is /home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed/addon.py
22:34:31 T:2933631856 M:537915392   DEBUG: Process - Setting the Python path to /home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed:/home/guy/.xbmc/addons/script.module.simplejson/lib:/home/guy/.xbmc/addons/script.module.beautifulsoup/lib:/usr/lib/xbmc/addons/script.module.pil/lib:/usr/lib/xbmc/addons/script.module.pysqlite/lib:/usr/lib/xbmc/system/python/python24.zip:/usr/share/xbmc/system/python/lib/python24.zip:/usr/share/xbmc/system/python/lib/python2.4/:/usr/share/xbmc/system/python/lib/python2.4/plat-linux2:/usr/share/xbmc/system/python/lib/python2.4/lib-tk:/usr/share/xbmc/system/python/lib/python2.4/lib-dynload
22:34:31 T:2933631856 M:537915392   DEBUG: Process - Entering source directory /home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed
22:34:31 T:2933631856 M:537915392    INFO: -->Python script returned the following error<--
22:34:31 T:2933631856 M:537915392   ERROR: Error Type: exceptions.SyntaxError
22:34:31 T:2933631856 M:537915392   ERROR: Error Contents: ('invalid syntax', ('/home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed/addon.py', 77, 13, "    with open(filename, 'rb') as f:\n"))
22:34:31 T:2933631856 M:537915392   ERROR:   File "/home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed/addon.py", line 77
                                                with open(filename, 'rb') as f:
                                                        ^
                                            SyntaxError: invalid syntax
22:34:31 T:2933631856 M:537915392    INFO: -->End of Python script error report<--
22:34:31 T:2933631856 M:537661440   DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/time.so. flags: 2
22:34:31 T:2933631856 M:537661440   DEBUG: Loading: /home/guy/.xbmc/temp/time.so
22:34:31 T:2933631856 M:537661440   DEBUG: RegisterExtensionLib, adding time.so (0x984a3e0)
22:34:31 T:2933631856 M:537661440   DEBUG: xbp_dlsym - load symbol inittime
22:34:31 T:2933631856 M:537534464   DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/collections.so. flags: 2
22:34:31 T:2933631856 M:537661440   DEBUG: Loading: /home/guy/.xbmc/temp/collections.so
22:34:31 T:2933631856 M:537661440   DEBUG: RegisterExtensionLib, adding collections.so (0x98cacb0)
22:34:31 T:2933631856 M:537661440   DEBUG: xbp_dlsym - load symbol initcollections
22:34:31 T:2933631856 M:537661440    INFO: Python script stopped
22:34:31 T:2933631856 M:537661440   DEBUG: Thread 2933631856 terminating
22:34:31 T:2942024560 M:537661440   DEBUG:  WaitOnScriptResult - plugin exited prematurely - terminating
22:34:31 T:3079419776 M:537661440   ERROR: GetDirectory - Error getting plugin://plugin.image.iphoto/
22:34:31 T:3079419776 M:537661440   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.iphoto/) failed
22:34:31 T:3079419776 M:537661440   DEBUG: CGUIMediaWindow::GetDirectory (addons://sources/image/)
22:34:31 T:3079419776 M:537661440   DEBUG:   ParentPath = []

I'm running XBMC on Ubuntu 11.04 with the iPhoto library networked from a Mac OS X 10.4 smb share. The share is mounted through Ubuntu, not XBMC.

Which I've done by
Code:
sudo mount -t cifs //netbios/directory/ /media/iPhoto/ -o username=username,password=password,file_mode=0777,dir_mode=0777

I've set up the share on the Mac using SharePoint.

I may not have privileges set right for the share when it's mounted but I can browse. I say this because when navigating the share using Nautilus the child-directories are read-only(only the first level down from parent the rest are rw below that)

I have v1.5.1 of the addon installed on the latest build of XBMC. I didn't enabe the SVN Repo when setting up.

Just to make sure; when setting the path for the AlbumData.xml file I only need to set the directory don't I? not select the actual file? (I can only see directories when navigating the 'set path' dialogue in the addon config.

Thanks in advance for any help anyone can give me with this.
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #44
GGet Wrote:I'm running into the error "Script failed: addon.py"

Below is the (what I think is) relevant lines from the log file
Code:
22:34:31 T:2933631856 M:537915392    INFO: -->Python script returned the following error<--
22:34:31 T:2933631856 M:537915392   ERROR: Error Type: exceptions.SyntaxError
22:34:31 T:2933631856 M:537915392   ERROR: Error Contents: ('invalid syntax', ('/home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed/addon.py', 77, 13, "    with open(filename, 'rb') as f:\n"))
22:34:31 T:2933631856 M:537915392   ERROR:   File "/home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed/addon.py", line 77
                                                with open(filename, 'rb') as f:
                                                        ^
                                            SyntaxError: invalid syntax
22:34:31 T:2933631856 M:537915392    INFO: -->End of Python script error report<--

The eden-pre version of my plugin assumes you have Python 2.6, but it looks like you don't. Either that or whoever built your nightly built it with internal Python 2.4.

Installing Python 2.6 should solve the problem for you.

Quote:I may not have privileges set right for the share when it's mounted but I can browse. I say this because when navigating the share using Nautilus the child-directories are read-only(only the first level down from parent the rest are rw below that)

You won't need write access anyway, so you're fine.

Quote:Just to make sure; when setting the path for the AlbumData.xml file I only need to set the directory don't I? not select the actual file? (I can only see directories when navigating the 'set path' dialogue in the addon config.

That's correct.

-j
find quote
GGet Offline
Junior Member
Posts: 10
Joined: Jun 2011
Reputation: 0
Post: #45
Thanks for the quick reply. Python 2.6 is installed. Are there any other related packages I should check to see are installed?

I'd installed xbmc just by adding the maverick respository (couldn't find an 11.04 xbmc repo) and then installing by doing
Code:
apt-get install xbmc

Should I have installed using another method?

Thanks again for your help.
find quote
GOODRIDDANCE Offline
Junior Member
Posts: 15
Joined: Jul 2009
Reputation: 0
Location: Germany
Post: #46
I´m running XMC Live 10.1 Dharma.
The iPhoto Database is on a Mac running 10.6.8.0 / iPhoto 2011 and is shared via SMB.

I´ve installe the plugin today / Version 1.4.5.
In the configuration of the plugin i switched to the SMB share wich I added before in Videos.
So far so good.

But now when I click in Pictures and open the Plugin 1.4.5 i see Folders like "Albums" "Faces" ect. and I see in the right up "Script failed: addon.py"

This is a XBMC Live 10.1 Dharma without any changes downloaded Image today from xmbc.org.
Are you sure that your script is running out of the box via XBMC Live?
It seems that it isn´t so.

Does anyone have a solution for me?
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #47
GGet Wrote:Thanks for the quick reply. Python 2.6 is installed. Are there any other related packages I should check to see are installed

The "with...open" syntax is new as of Python 2.5, so I can only assume that you're using a version less than that.

What does /usr/bin/python point to? It should be a symlink to python2.6. You probably have multiple versions of Python installed.

If you do have Python 2.4 and don't need it for anything in particular, you can just try removing it. If you do need it, use update-alternatives to change the default version to Python 2.6.

Also, you are sure you are running a nightly build of XBMC, yes? If you're running 10.x you've got the wrong version of my plugin (it should be 1.4.5).

-j
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #48
GOODRIDDANCE Wrote:Are you sure that your script is running out of the box via XBMC Live?
It seems that it isn´t so.

Well, I definitely cannot say it works for every user right out of the box, as there can be bugs that I have not yet found. But I can say it works for me Smile

I will need to see your debug log to tell you anything further, though.

-j
find quote
GOODRIDDANCE Offline
Junior Member
Posts: 15
Joined: Jul 2009
Reputation: 0
Location: Germany
Post: #49
Here are the last lines from the xbmc.log


21:35:46 T:2194590576 M:1900367872 NOTICE: -->Python Interpreter Initialized<--
21:35:48 T:2194590576 M:1899855872 NOTICE: {'action': 'albums'}
21:35:48 T:2194590576 M:1899855872 NOTICE: 'albumid'
21:35:48 T:3077498752 M:1899855872 ERROR: GetDirectory - Error getting plugin://plugin.image.iphoto/?action=albums
21:35:48 T:3077498752 M:1899855872 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.iphoto/?action=albums) failed
21:35:50 T:3077498752 M:1899765760 ERROR: Texture manager unable to load file: /home/dba/.xbmc/addons/plugin.image.iphoto/resources/icons/faces.png
21:35:52 T:2205080432 M:1899765760 NOTICE: -->Python Interpreter Initialized<--
21:35:55 T:2205080432 M:1899765760 NOTICE: {'action': 'albums'}
21:35:55 T:2205080432 M:1899765760 NOTICE: 'albumid'
21:35:55 T:3077498752 M:1899761664 ERROR: GetDirectory - Error getting plugin://plugin.image.iphoto/?action=albums
21:35:55 T:3077498752 M:1899761664 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.iphoto/?action=albums) failed
21:35:59 T:2845911920 M:1899937792 NOTICE: -->Python Interpreter Initialized<--
21:36:01 T:2845911920 M:1899929600 ERROR: Error Type: exceptions.IOError
21:36:01 T:2845911920 M:1899929600 ERROR: Error Contents: (2, 'No such file or directory', 'smb://dba:mypassword@iMac/Pictures/AlbumData.xml')
21:36:01 T:2845911920 M:1899929600 ERROR: Traceback (most recent call last):
File "/home/dba/.xbmc/addons/plugin.image.iphoto/addon.py", line 574, in ?
copyfile(origxml, tmpfile)
File "/usr/lib/xbmc/system/python/python24.zip/shutil.py", line 47, in copyfile
fsrc = open(src, 'rb')
IOError: (2, 'No such file or directory', 'smb://dba:mypassword@iMac/Pictures/AlbumData.xml')
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #50
GOODRIDDANCE Wrote:Here are the last lines from the xbmc.log

IOError: (2, 'No such file or directory', 'smb://dba:mypassword@iMac/Pictures/AlbumData.xml')

You chose the wrong directory in the plugin configuration. You need to choose the directory called "iPhoto Library".

-j
find quote
Post Reply