briot / geneapro

Genealogical software based on the GenTech data model
http://briot.github.com/geneapro/
GNU General Public License v2.0
33 stars 8 forks source link

Problem during GEDCOM import: Surety_Scheme matching query does not exist. #13

Closed darethehair closed 9 years ago

darethehair commented 10 years ago

Turned on debugging and got this while trying to import my GEDCOM:

[27/Nov/2013 20:22:10] "GET /personas HTTP/1.1" 200 5128 [util 2013-11-27 20:22:55,932] DEBUG (0.002) INSERT INTO "researcher" ("name", "comment") VALUES (unknown, ); args=['unknown', ''] [util 2013-11-27 20:22:55,933] DEBUG (0.000) SELECT "surety_scheme"."id", "surety_scheme"."name", "surety_scheme"."description" FROM "surety_scheme" WHERE "surety_scheme"."id" = 1 ; args=(1,) Unexpected Exception Surety_Scheme matching query does not exist. Traceback (most recent call last): File "/mnt/sda6/download/geneapro-master/geneaprove/importers/gedcomimport.py", line 1027, in parse parser = GedcomImporterCumulate(parsed) File "/mnt/sda6/download/geneapro-master/geneaprove/importers/gedcomimport.py", line 993, in init super(GedcomImporterCumulate, self).init(_args, _kwargs) File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 223, in inner return func(_args, _kwargs) File "/mnt/sda6/download/geneapro-master/geneaprove/importers/gedcomimport.py", line 71, in init prj = self._create_project(self._researcher) File "/mnt/sda6/download/geneapro-master/geneaprove/importers/gedcomimport.py", line 936, in _create_project scheme=models.Surety_Scheme.objects.get(id=1)) File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 143, in get return self.get_query_set().get(_args, *_kwargs) File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 404, in get self.model._meta.object_name) DoesNotExist: Surety_Scheme matching query does not exist.

The message on the server webpage is:

GeneaProve could not import your file. This is either because your file does not contain correct GEDCOM data, or more likely because of limitations in GeneaProve.

briot commented 10 years ago

any chance you could send me your gedcom file (perhaps after running gedcom_anon.py if you want to preserve anonymity) ? I suspect this is more of an issue with the database not being initialized properly. Perhaps you could first start by removing geneaprove.db and start from scratch ?

darethehair commented 10 years ago

Sure, I will do whatever is required of me, since this looks like a VERY interesting genealogy package!

Can you get at this DropBox file? Yes, I passed it through the 'gedcom_anon.py':

https://www.dropbox.com/s/qwtckuz3db7s4fs/anon.ged

I should point out that the docs say to run 'make reset', but no such option is in the Makefile, so I used 'make full_reset' (and first dropping the database). That seems to mostly work, except for a strange message at the end:

... Installed 0 object(s) from 0 fixture(s) make: *\ No rule to make target reset', needed byfull_reset'. Stop.

This confirms that 'reset' is not present (?).

Then I try to import that anon.ged file on the command line, and get the same error that I reported:

darren@frodo2 /mnt/sda6/download/geneapro-master $ ./manage.py import anon.ged Importing anon.ged [util 2013-11-27 22:30:58,030] DEBUG (0.002) INSERT INTO "researcher" ("name", "comment") VALUES (unknown, ); args=['unknown', ''] [util 2013-11-27 22:30:58,032] DEBUG (0.000) SELECT "surety_scheme"."id", "surety_scheme"."name", "surety_scheme"."description" FROM "surety_scheme" WHERE "surety_scheme"."id" = 1 ; args=(1,) Unexpected Exception Surety_Scheme matching query does not exist. Traceback (most recent call last): File "/mnt/sda6/download/geneapro-master/geneaprove/importers/gedcomimport.py", line 1027, in parse parser = GedcomImporterCumulate(parsed) File "/mnt/sda6/download/geneapro-master/geneaprove/importers/gedcomimport.py", line 993, in init super(GedcomImporterCumulate, self).init(_args, _kwargs) File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 223, in inner return func(_args, _kwargs) File "/mnt/sda6/download/geneapro-master/geneaprove/importers/gedcomimport.py", line 71, in init prj = self._create_project(self._researcher) File "/mnt/sda6/download/geneapro-master/geneaprove/importers/gedcomimport.py", line 936, in _create_project scheme=models.Surety_Scheme.objects.get(id=1)) File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 143, in get return self.get_query_set().get(_args, *_kwargs) File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 404, in get self.model._meta.object_name) DoesNotExist: Surety_Scheme matching query does not exist. Done importing (1.003 s)

Run 'ANALYZE;' in the database to optimize it

briot commented 10 years ago

Sure, I will do whatever is required of me, since this looks like a VERY interesting genealogy package!

Can you get at this DropBox file? Yes, I passed it through the 'gedcom_anon.py':

https://www.dropbox.com/s/qwtckuz3db7s4fs/anon.ged

I should point out that the docs say to run 'make reset', but no such option is in the Makefile, so I used 'make full_reset' (and first dropping the database). That seems to mostly work, except for a strange message at the end:

I have fixed the doc (basically, you should remove geneaprove.db and run geneaprove.py which does everything for you). I have also added support for the "REFN" data that is found in your gedcom. The file can be correctly imported after this in my setup. Let me know what is happening for you.

Thanks

Emmanuel

darethehair commented 10 years ago

Great! It now works and I saw do all the mouse/graphics/charts stuff that I was looking forward to :) Thanks!

Not a big deal, but import still generated some warnings:

Your file was successfully imported, although some data might be missing. Check the output of the importer below:

line 14545 Unhandled FAM.NOTE line 15214 Unhandled FAM.NOTE line 16039 Unhandled FAM.NOTE line 17145 Unhandled FILE.NOTE

If I might be so bold, the very first thing I would add to a 'wish list' would be some way to control the size of the fonts used on the labels. I realize that they are trying to auto-size the best they can, but sometimes they are just a bit too big (to fit) or too small (to read).

The next thing on my 'wish list' would be an easy toggle for suppressing dates of 'living' people (either by an explicit 'death date' or as assumption that anyone over 100 is probably gone). That would then allow me to put this onto my 'public' web server -- even as the app is refined over time.

briot commented 10 years ago

Your file was successfully imported, although some data might be missing. Check the output of the importer below:

line 14545 Unhandled FAM.NOTE line 15214 Unhandled FAM.NOTE line 16039 Unhandled FAM.NOTE line 17145 Unhandled FILE.NOTE

Yes, I noticed those indeed. I haven't considered these urgent for now, since this is still read-only software, but that's definitely something to fix. I have in fact done a similar imported in objective-c which imports all the data, so I basically know where I need to save things in the model.

If I might be so bold, the very first thing I would add to a 'wish list' would be some way to control the size of the fonts used on the labels. I realize that they are trying to auto-size the best they can, but sometimes they are just a bit too big (to fit) or too small (to read).

Can you do a few screenshots to show ?

The next thing on my 'wish list' would be an easy toggle for suppressing dates of 'living' people (either by an explicit 'death date' or as assumption that anyone over 100 is probably gone). That would then allow me to put this onto my 'public' web server -- even as the app is refined over time.

Interesting indeed. Why not. A workaround in the meantime is to not export those in your GEDCOM from your current software.

regards Emmanuel

darethehair commented 10 years ago

1) Re: the font size issue: If you can see my dropbox links:

https://www.dropbox.com/s/eiqwg9kmh9jey9x/side_graph.png https://www.dropbox.com/s/rhavnccjbgec19y/circle_graph.png

2) Re: the living person date suppression. Yes, I totally agree that it is possible to 'work around' this if needed. In my case, though, my current (linux) genealogy software (Ftree) does not support generating a new GEDCOM that way. Perhaps this is a common feature of other packages, but the software writers would need to be careful not to accidentally overwrite the primary GEDCOM that way. I also wrote my own app for the Nokia N800 tablet -- it does not have that feature, and I could still add it, but I think the superior solution is to have the 'display' software (in this case Geneapro) simply suppress the info when asked to do so -- without the need for a separate/special GEDCOM :)

Did you want me to use this Github Issue facility like this to make 'wishlist' requests? If so, another one would be to be able to control the amount of info displayed on the charts i.e. rather than just the year, to have full dates, then locations, etc.. Another one that I am not sure is actually possible without having visitor accounts (blah!) or cookies or whatever is to 'remember' the selected person-of-interest from one session to the next. Should I create separate 'issues'?

I must say that I very much appreciate the 'responsiveness' to my bugs/questions :)

P.S. The 'checkmarks' are a bit confusing/distracting to me -- are they significant in some way?

briot commented 10 years ago

1) Re: the font size issue: If you can see my dropbox links:

https://www.dropbox.com/s/eiqwg9kmh9jey9x/side_graph.png https://www.dropbox.com/s/rhavnccjbgec19y/circle_graph.png

I'll look at them.

2) Re: the living person date suppression. Yes, I totally agree that it is possible to 'work around' this if needed. In my case, though, my current (linux) genealogy software (Ftree) does not support generating a new GEDCOM that way. Perhaps this is a common feature of other packages, but the software writers would need to be careful not to accidentally overwrite the primary GEDCOM that way. I also wrote my own app for the Nokia N800 tablet -- it does not have that feature, and I could still add it, but I think the superior solution is to have the 'display' software (in this case Geneapro) simply suppress the info when asked to do so -- without the need for a separate/special GEDCOM :)

Sure, I understand that, but the time to work on geneaprove is a bit limited right now, so I was trying to find a quicker solution for you.

Did you want me to use this Github Issue facility like this to make 'wishlist' requests?

Sure, it would be easier to have separate entries for them, to keep track of them.

P.S. The 'checkmarks' are a bit confusing/distracting to me -- are they significant in some way?

Sure, they indicate which events have some source (a part which is very important to me, and the whole reason to embark on geneaprove).