Quantcast

Problem exporting database in SQlite

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem exporting database in SQlite

Hivernat Emmanuel
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 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-bugs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-bugs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem exporting database in SQlite

Hivernat Emmanuel
Hi,

The problem was according Nick :
"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."

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 11/05/2014 23:02, Hivernat Emmanuel a écrit :

> 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-bugs mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-bugs
>

------------------------------------------------------------------------------
"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-bugs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-bugs
Loading...