DavidMStraub / gramps-webapp

Genealogical progressive web app based on Gramps
GNU General Public License v3.0
18 stars 4 forks source link

Error handling in case of broken links in the DB #17

Open ghost opened 4 years ago

ghost commented 4 years ago
DavidMStraub commented 4 years ago

Thanks for reporting! Apparently a family object has a note handle it reports via get_note_list but which does not actually exist. I didn't know that's possible. To better understand: do you set either GRAMPS_EXCLUDE_PRIVATE or GRAMPS_EXCLUDE_LIVING to True?

ghost commented 4 years ago

I do not set GRAMPS_EXCLUDE_PRIVATE or GRAMPS_EXCLUDE_LIVING to True. Although I'm not sure where I would set those variables. Are they environment variables? Is there any mention of these in the documentation?

DavidMStraub commented 4 years ago

Thanks, that eliminates two possible sources of error. (By the way, yes those are environment variables and they are mentioned in the Readme, which currently is the only documentation.)

Could you please run the "Check and Repair" tool in Gramps? (Tools > Database Repair > Check and Repair Database) and see if the problems persists after that?

I might have to add try/except clauses for each of the lookup functions otherwise.

ghost commented 4 years ago

How do I use the --force-unlock option?

I've tried several times, but can't get it to work.

ERROR: Use the --force-unlock option if you are sure that the database is not in use. ERROR: Use the --force-unlock option if you are sure that the database is not in use. ERROR: Use the --force-unlock option if you are sure that the database is not in use. ^Cjeff@jeff-OptiPlex-380 ~/projects/gramps-webapp $ gramps_webapp -O 'Family Tre2' run --force-unlock .gramps.gen.utils.grampslocale.WARNING: ICU not loaded because No module named 'PyICU'. Localization will be impaired. Use your package manager to install PyICU Usage: gramps_webapp run [OPTIONS] Try "gramps_webapp run --help" for help.

Error: no such option: --force-unlock jeff@jeff-OptiPlex-380 ~/projects/gramps-webapp $

On 10/6/19 1:19 PM, David Straub wrote:

Thanks, that eliminates two possible sources of error. (By the way, yes those are environment variables and they are mentioned in the Readme, which currently is the only documentation.)

Could you please run the "Check and Repair" tool in Gramps? (Tools > Database Repair > Check and Repair Database) and see if the problems persists after that?

I might have to add try/except clauses for each of the lookup functions otherwise.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DavidMStraub/gramps-webapp/issues/17?email_source=notifications&email_token=ANM2UA7BI247DRG3MCZPOS3QNITZXA5CNFSM4I5ZSHYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOQOXA#issuecomment-538773340, or mute the thread https://github.com/notifications/unsubscribe-auth/ANM2UA3DNCSXCOHGDPI3UYTQNITZXANCNFSM4I5ZSHYA.

ghost commented 4 years ago

Ok. I ran the repair on the database, lots of issues. After that, I re-ran the gramps-webapp and gramps-webapp-frontend, and it appeared to work. I was able to get the app to run (first time after several weeks). Of course, this app probably needs to be more robust, but repair the database did work. thanks for your help.

DavidMStraub commented 4 years ago

OK good. Actually I'll keep the issue open until I've better understood where I need to be more failsafe w.r.t. broken links in the database (I wasn't really aware that this is possible).

Concerning force-unlock: this is an option of the Gramps CLI (which throws the error message) but isn't available for the web app. I could add it, but more likely I'll just change it such that it ignores the lock, since it's read-only anyway. In the meantime, you can use Gramps to break the lock, or simply delete the empty file lock in the database folder.