[RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags

  Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
twiseva Offline
Junior Member
Posts: 39
Joined: Jul 2013
Reputation: 0
Post: #631
(2016-06-10 03:13)twiseva Wrote:  
(2016-06-06 15:01)peppe_sr Wrote:  
(2016-06-06 12:03)Xycl Wrote:  Please try version 13.3.8

it worked at first attempt
thanks
Peppe

So it seems that this same error has appeared for ma after updating to 13.3.8. See http://pastebin.com/raw/SHXqw4ZL. Looks basically the same. Prior to 13.3.8 all was well, afterwards get an error popup and this in the logs.

Did a quick hack that worked for me in default.py as follows. Excuse my hack as I have never programmed in Python.

95 # Altered change to remove the '&reload' and EVERYTHING after it
96 self.parm= self.parm.split('&reload=')[0]
find quote
Xycl Offline
Fan
Posts: 423
Joined: Feb 2012
Reputation: 9
Location: Germany
Post: #632
To only remove &reload=xxx till next ampersand please use version 13.3.9

No log no help.
How to submit a log file: XBMC-Wiki

Main page: https://github.com/Xycl
Repository: Xycl Repository
find quote
twiseva Offline
Junior Member
Posts: 39
Joined: Jul 2013
Reputation: 0
Post: #633
(2016-06-10 15:29)Xycl Wrote:  To only remove &reload=xxx till next ampersand please use version 13.3.9

Works great -- thanks @Xycl.
find quote
stuka Offline
Junior Member
Posts: 2
Joined: Jun 2016
Reputation: 0
Post: #634
Hey,
Before explaining why I came here, let me say that I'm a beginner with Kodi, and Kodi Add-ons.
So I installed Kodi, then your (marvelous) add-on on my old PC, which was running Windows before, and now Mint 17.3.

When I try to scan the folder that contains all my pics (about 20.000), PyPicsDB scans it, but stops after a while. It finds precisely 5311 pictures.
I tried 2 times with different installs, and the problem remains the same. I don't know if I'm just dumb and didn't find an obvious way to fix it, or if a problem exists in my files.

Thanks for reading this, and thanks for you work !

EDIT : It appears that one of my .jpg has been corruted, excluded it and re-scanning, I'll update in the morning
(This post was last modified: 2016-07-01 22:56 by stuka.)
find quote
peppe_sr Offline
Posting Freak
Posts: 1,150
Joined: Mar 2006
Reputation: 15
Location: Italia, Sicilia, Siracusa
Post: #635
The easy way to understand your problem is through a debug log. Turn in on the settings, perform the scan and post the log on pastebin
Peppe
find quote
stuka Offline
Junior Member
Posts: 2
Joined: Jun 2016
Reputation: 0
Post: #636
Thanks,
I checked myself in the log a bit, and it appears that one folder I was trying to scan contained corrupted files.
I excluded it in the search path, and it worked properly
Thanks for reading me, problem is fixed !
find quote
varun432 Offline
Junior Member
Posts: 5
Joined: Jul 2016
Reputation: 0
Post: #637
Hi I am new here

Hey , how to add music playlist to my album
I can't seem to be able to do it... Can't find that option anywhere

Please help with this stupid question

Thanks in advance for reply
find quote
rubpa Offline
Junior Member
Posts: 40
Joined: Jun 2010
Reputation: 0
Location: India
Post: #638
Hi!

I've been using MyPicsDB for years now and a problem has been bothering me for months. I tag my photos using the face tagging feature of Picasa for Windows (which is configured to write face tags to the photos itself). I've 4000 pics of person X but MyPicsDB shows only about 400. The number shown by MyPicsDB varies whenever I go to Browse by Tags -> Person. Never figured out why. I've tried resetting the whole db and the problem is back after few weeks.

Today,
- I added only 1 folder to MyPicsDB with about 1000 photos. It found 411 photos of person X. Closed Kodi.
- Opened Picasa, tagged a new person (about 25 photos). Closed Picasa.
- Opened Kodi, MyPicsDB, scan for new/changed photos.
- After the scanning, new person has 25 photos, person X is down to 6 photos (all of which have new person as well).

If it helps, Picasa writes XMP-mwg-rs tags for faces.

Kindly fix the problem.
find quote
rubpa Offline
Junior Member
Posts: 40
Joined: Jun 2010
Reputation: 0
Location: India
Bug  RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags
Post: #639
Hi Xycl!

It appears that more tags have a similar problem, not just the Person tag. I did an even more minimal test today. I added a single folder to MyPicsDB with 2 pictures. Both pics had the IPTC Caption/Description set to "Wow". I scanned them and I see 2 pics in the Browse by Tags -> Description -> Wow.

Then I edited one of the pictures and changed the caption to "Wowa". I scanned for new & changed pictures and MyPicsDB correctly shows 1 modified. Now Browse by Tags -> Description -> has only Wowa listed and Wow is missing.

However this does not happen always, sometimes both tags stayed - keep changing the caption from Wow to Wowa and back and the problem does happen soon enough. When it happens, I checked with a sqlite browser that the TagsInFiles.idTagContent has values which do not exist in TagContents table. It appears that instead of reusing the existing idTagType<->TagContent unique pair, a new record is added with a new idTagContent and the old pairs are deleted.

Is it a bug in the sqlite engine? I did my tests with v16.1 on Win7. I strongly believe it is the same problem on my main kodibuntu installation.
find quote
smarthomems Offline
Junior Member
Posts: 1
Joined: Jan 2015
Reputation: 0
Post: #640
Hi Xycl!,
I have connected the Plugin to my MYSQL database which is working fine and also updating the database. When searching for picture with a certain tag I receive no results due to an SQL exception:
The Log says the following (Searching for Keyword Tag NRW):

16:38:08 T:12264 NOTICE: [My Pictures Database] line 86 in default.py object Main.get_args >> MyPicturesDB plugin called :
16:38:08 T:12264 NOTICE: [My Pictures Database] line 87 in default.py object Main.get_args >> sys.argv[0] = plugin://plugin.image.mypicsdb/
16:38:08 T:12264 NOTICE: [My Pictures Database] line 88 in default.py object Main.get_args >> sys.argv[2] = ?action=%27showpics%27&method=%27tag%27&name=%27NRW%20(32%20Pics)%27&page=%271%27&tag=%27NRW%27&tagtype=%27Keyword%27&viewmode=%27view%27
16:38:08 T:12264 NOTICE: [My Pictures Database] line 101 in default.py object Main.get_args >> action='showpics',method='tag',name='NRW (32 Pics)',page='1',tag='NRW',tagtype='Keyword',viewmode='view'
16:38:08 T:12264 NOTICE: [My Pictures Database] line 63 in MypicsDB.py function __init__ >> Used DB Backend = MySql
16:38:08 T:12264 NOTICE: Previous line repeats 1 times.
16:38:08 T:12264 ERROR: [My Pictures Database] line 274 in dbabstractionlayer.py object Database abstraction layer >> The request failed :
16:38:08 T:12264 ERROR: [My Pictures Database] line 275 in dbabstractionlayer.py object Database abstraction layer >> <type 'exceptions.Exception'> - 3065: Expression #1 of ORDER BY clause is not in SELECT list, references column 'MyPicsDB.f.ImageDateTime' which is not in SELECT list; this is incompatible with DISTINCT
16:38:08 T:12264 ERROR: [My Pictures Database] line 279 in dbabstractionlayer.py object Database abstraction layer >> SQL > SELECT distinct strPath,strFilename FROM Files f, TagContents tc, TagsInFiles tif, TagTypes tt WHERE f.idFile = tif.idFile AND tif.idTagContent = tc.idTagContent AND tc.TagContent = ? and tc.idTagType = tt.idTagType and length(trim(tt.TagTranslation))>0 and tt.TagTranslation = ? order by imagedatetime
16:38:08 T:12264 NOTICE: [My Pictures Database] line 285 in dbabstractionlayer.py object SQL request numvar = 1 content = NRW >> 4
16:38:08 T:12264 NOTICE: [My Pictures Database] line 285 in dbabstractionlayer.py object SQL request numvar = 2 content = Keyword >> 4

The MySQL server is the following: Server-Version: 5.7.13-0ubuntu0.16.04.2 - (Ubuntu)

Needless to say that with SQLLite it works without a problem:-)

Thanks
find quote
mikebzh44 Online
Posting Freak
Posts: 2,093
Joined: Nov 2011
Reputation: 58
Location: Nantes - France
Post: #641
Just discover that I can use a MySQL Database so I set up the addon to plug my my MySQL database and rescan my folders.

But when I restart Kodi, I have a MyPicsDB error :

Code:
18:53:09 T:1060   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IndexError'>
                                            Error Contents: list index out of range
                                            Traceback (most recent call last):
                                              File "C:\Kodi\16.1\portable_data\addons\plugin.image.mypicsdb\default.py", line 1940, in <module>
                                                m.set_properties()
                                              File "C:\Kodi\16.1\portable_data\addons\plugin.image.mypicsdb\default.py", line 1398, in set_properties
                                                Collections = MPDB.cur.request( """SELECT COUNT(*) FROM collections""" )[0]
                                            IndexError: list index out of range
                                            -->End of Python script error report<--

Don't know if it's due to my MySQL version (running on my ReadyNAS-RN102 NAS) but table Collection is spelled with a upcase C.

After editing default.py :

Code:
Collections = MPDB.cur.request( """SELECT COUNT(*) FROM Collections""" )[0]

Everything is OK.

Sorry for my english, but, you know, I'm French so ...

Main HTPC : Core i3 2120T running OpenELEC with Aeon Nox 5 and my mod
Secondary HTPC : Freebox Mini 4K running Android TV with Aeon Nox 5 and my mod
find quote
mikebzh44 Online
Posting Freak
Posts: 2,093
Joined: Nov 2011
Reputation: 58
Location: Nantes - France
Post: #642
Hi Xycl.

Just mod your release to return comment in Window properties :

http://forum.kodi.tv/showthread.php?tid=...pid2409499

I will make a PR on your GITHUB if you wan to include this new feature.

Thanks for this awesome addon Wink

Sorry for my english, but, you know, I'm French so ...

Main HTPC : Core i3 2120T running OpenELEC with Aeon Nox 5 and my mod
Secondary HTPC : Freebox Mini 4K running Android TV with Aeon Nox 5 and my mod
find quote
MrsAngelD Offline
Senior Member
Posts: 152
Joined: Aug 2011
Reputation: 2
Post: #643
(2016-09-05 18:59)mikebzh44 Wrote:  Just discover that I can use a MySQL Database so I set up the addon to plug my my MySQL database and rescan my folders.

But when I restart Kodi, I have a MyPicsDB error :

Code:
18:53:09 T:1060   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IndexError'>
                                            Error Contents: list index out of range
                                            Traceback (most recent call last):
                                              File "C:\Kodi\16.1\portable_data\addons\plugin.image.mypicsdb\default.py", line 1940, in <module>
                                                m.set_properties()
                                              File "C:\Kodi\16.1\portable_data\addons\plugin.image.mypicsdb\default.py", line 1398, in set_properties
                                                Collections = MPDB.cur.request( """SELECT COUNT(*) FROM collections""" )[0]
                                            IndexError: list index out of range
                                            -->End of Python script error report<--

Don't know if it's due to my MySQL version (running on my ReadyNAS-RN102 NAS) but table Collection is spelled with a upcase C.

After editing default.py :

Code:
Collections = MPDB.cur.request( """SELECT COUNT(*) FROM Collections""" )[0]

Everything is OK.

I don't think it's just you, I had the same error and editing my file fixed it as well. My database is running on Ubuntu Linux 14.04.

Thanks for posting your fix btw Smile
find quote
Post Reply