Hi,
I’m running gramps --open="XXX" --action=book --options="name=YYY,off=pdf,of=File.pdf"
.
It works wih one book but not with another and I receive:
Ouverture réussie !
Action demandée : book.
Utilisation de la chaîne d'options : name=YYY,off=pdf,of=File.pdf
100% Application...
100% Collecte des données...
100% Tri des données...
ReportError L'individu n'est pas présent dans la base de données
100% Application...
100% Enregistrement des diagrammes...
100% Application...
100% Recherche de la période...
100% Application...
100% Tri des dates...
100% Calcul de la période...
2024-11-28 13:37:27.996: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
File "/usr/bin/gramps", line 3, in <module>
app.main()
File "/usr/lib/python3/dist-packages/gramps/grampsapp.py", line 686, in main
errors = run()
^^^^^
File "/usr/lib/python3/dist-packages/gramps/grampsapp.py", line 678, in run
startcli(error, argpars)
File "/usr/lib/python3/dist-packages/gramps/cli/grampscli.py", line 379, in startcli
handler.handle_args_cli()
File "/usr/lib/python3/dist-packages/gramps/cli/arghandler.py", line 481, in handle_args_cli
self.cl_action(action, op_string)
File "/usr/lib/python3/dist-packages/gramps/cli/arghandler.py", line 746, in cl_action
cl_book(
File "/usr/lib/python3/dist-packages/gramps/cli/plug/__init__.py", line 911, in cl_book
rpt.begin_report()
^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'begin_report'
If anyone has an idea
What happens if you try to create this book from the menu?
It works well when created from menu
The important error line is:
ReportError L'individu n'est pas présent dans la base de données
It looks like a report is failing because it needs a centre person to be specified. It is trying to use an empty string.
Try using the “pid” report option to specify the Gramps ID of a centre person.
Great idea, but now it gives Les options valides sont : of, off, style, papers, papero, paperml, papermr, papermt, papermb
saying pid is not allowed, while using gramps --open="XXX" --action=book --options="name=YYY,off=pdf,of=File.pdf,pid=I0001";
OK, let me guess. I never use the command line this way, but I am assuming that XXX is the name of your tree, and YYY is the base name of the report file. Is that right?
If it is, it seems like the report code is wrong, because it does not accept the PID argument, which it needs to find the start person. There’s more wrong with it, because if the person can’t be found, it should quit in a more friendly way, not throw an exception like this one.
If this CLI command is running a Book, not a report, does that change parameter passing expectations?
Perhaps the Book was created for one Tree and is being applied to a different one. So the parameters for a report in the Book don’t pertain to the other Tree?
Yes XXX is the name of my tree and YYY the final filename.
The book that works doesn’t require any id as it’s only statistics of the database.
The one that doesn’t work, yes, is based on a person in the software, so maybe I can’t do this book. I’m just beginning in the use of the command line