Re: [Gramps-bugs] Problem exporting database in SQlite

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Gramps-bugs] Problem exporting database in SQlite

Hivernat Emmanuel
Hi,

It seems to be a problem with associations between person (I use it for
Godparents).

Any idea to solve?

Regards

Le 09/05/2014 00:29, Hivernat Emmanuel a écrit :

> Hello,
>
> I use Gramps 4.0.3 on Ubuntu 14.04
> While trying to make an export to SQLITE database I have this error message
> :
>
> 35115: ERROR: _exportassistant.py: line 600: Erreur lors de l'exportation de
> votre arbre familial
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.7/dist-packages/gramps/gui/plug/export/_exportassistant.py",
> line 596, in save
>      self.option_box_instance)
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 916,
> in exportData
>      export_person(db, person.serialize())
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 602,
> in export_person
>      export_person_ref_list(db, "person", handle, person_ref_list)
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 426,
> in export_person_ref_list
>      private
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 373,
> in query
>      self.cursor.execute(q, args)
> IntegrityError: UNIQUE constraint failed: person_ref.handle
>
> Does somebody know an issue?
>
> Thanks
> Manu
>
>
>
> --
> View this message in context: http://gramps.1791082.n4.nabble.com/Problem-exporting-database-in-SQlite-tp4665858.html
> Sent from the gramps-bugs mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> Gramps-bugs mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-bugs
>

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: [Gramps-bugs] Problem exporting database in SQlite

Nick Hall
The handle for the associated person is used for the primary key in the person_ref table.  This will cause the error you are seeing if there is more than one association to the same person.  For example, if you have a person that is a godparent to more than one child.

The solution is to create a new primary key for the person_ref table, and add an extra link in the links table.  The import will also need to be fixed.

Nick.


On 11/05/14 22:02, Hivernat Emmanuel wrote:
Hi,

It seems to be a problem with associations between person (I use it for 
Godparents).

Any idea to solve?

Regards

Le 09/05/2014 00:29, Hivernat Emmanuel a écrit :
> Hello,
>
> I use Gramps 4.0.3 on Ubuntu 14.04
> While trying to make an export to SQLITE database I have this error message
> :
>
> 35115: ERROR: _exportassistant.py: line 600: Erreur lors de l'exportation de
> votre arbre familial
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.7/dist-packages/gramps/gui/plug/export/_exportassistant.py",
> line 596, in save
>      self.option_box_instance)
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 916,
> in exportData
>      export_person(db, person.serialize())
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 602,
> in export_person
>      export_person_ref_list(db, "person", handle, person_ref_list)
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 426,
> in export_person_ref_list
>      private
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 373,
> in query
>      self.cursor.execute(q, args)
> IntegrityError: UNIQUE constraint failed: person_ref.handle
>
> Does somebody know an issue?
>
> Thanks
> Manu
>
>


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: [Gramps-bugs] Problem exporting database in SQlite

Hivernat Emmanuel
Hi,

So I've modified the 2 files  ExportSql and ImportSql and all seems to work now.
As Doug is the writer of this plugin I send him the files.
Hope you can integrate this modifications for futur.

Regards
Manu

Le 12/05/2014 01:13, Nick Hall a écrit :
The handle for the associated person is used for the primary key in the person_ref table.  This will cause the error you are seeing if there is more than one association to the same person.  For example, if you have a person that is a godparent to more than one child.

The solution is to create a new primary key for the person_ref table, and add an extra link in the links table.  The import will also need to be fixed.

Nick.


On 11/05/14 22:02, Hivernat Emmanuel wrote:
Hi,

It seems to be a problem with associations between person (I use it for 
Godparents).

Any idea to solve?

Regards

Le 09/05/2014 00:29, Hivernat Emmanuel a écrit :
> Hello,
>
> I use Gramps 4.0.3 on Ubuntu 14.04
> While trying to make an export to SQLITE database I have this error message
> :
>
> 35115: ERROR: _exportassistant.py: line 600: Erreur lors de l'exportation de
> votre arbre familial
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.7/dist-packages/gramps/gui/plug/export/_exportassistant.py",
> line 596, in save
>      self.option_box_instance)
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 916,
> in exportData
>      export_person(db, person.serialize())
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 602,
> in export_person
>      export_person_ref_list(db, "person", handle, person_ref_list)
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 426,
> in export_person_ref_list
>      private
>    File "/home/manu/.gramps/gramps40/plugins/Sqlite/ExportSql.py", line 373,
> in query
>      self.cursor.execute(q, args)
> IntegrityError: UNIQUE constraint failed: person_ref.handle
>
> Does somebody know an issue?
>
> Thanks
> Manu
>
>



------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce


_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: [Gramps-bugs] Problem exporting database in SQlite

Hivernat Emmanuel
I think that my modification can be a solution for bug #6167

I can't post the modified files but i can send in private mail
Reply | Threaded
Open this post in threaded view
|

Re: [Gramps-bugs] Problem exporting database in SQlite

DS Blank
Thanks, both for Manu's patches and Nick's analysis of the problem!

-Doug


On Tue, Jun 3, 2014 at 5:13 AM, Hivernat Emmanuel <[hidden email]> wrote:
I think that my modification can be a solution for bug #6167

I can't post the modified files but i can send in private mail



--
View this message in context: http://gramps.1791082.n4.nabble.com/Re-Gramps-bugs-Problem-exporting-database-in-SQlite-tp4665873p4666079.html
Sent from the GRAMPS - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users