[GNC] gnucash-env for python scripts (GnuCash 3.7)
Geert Janssens
geert.gnucash at kobaltwit.be
Mon Nov 11 04:53:16 EST 2019
Op zondag 10 november 2019 20:36:28 CET schreef Geert Janssens:
> Op zondag 10 november 2019 18:42:12 CET schreef CB:
> > Short question: Where to find 'gnucash-env' to run python scripts? All
> > python examples suggests following:
> >
> > # Invoke this script like the following example
> > # $ gnucash-env python account_analysis.py gnucash_file.gnucash \
> > # 2010 1 monthly 12 \
> > # debits-show credits-show Assets 'Test Account'
>
> That info is outdated. gnucash-env has been removed and shouldn't be needed
> anymore.
>
> > Long question: I am unable to successfully run example python scripts. Any
> > help would be greatly appreciated. I am including details below -
> > apologies
> > for long email.
> >
> > I have built GnuCash 3.7 on my linux computer with python bindings and am
> > able to use gnucash executable for general operation through UI. Now, I
> > have been trying to use python bindings for some custom analysis in
> > python3. I am trying to follow account_analysis.py example from source
> > code. However, I am unable to locate 'gnucash-env', which is suggested by
> > the example script to invoke it.
> >
> > Even after adding python3.6/site-packages to PYTHONPATH, I am getting
> > following errors. Probably, backend libs are not in path - but I could not
> > find any help regarding it.
>
> Do you have more than one gnucash installation on your system ? For example
> a 2.x version installed via your package manager.
>
> In any case, gnucash is supposed to search for the backend libs relatively
> to your python site-packages (it correctly does so on my system), but
> perhaps your system lays out its directories differently.
>
> Is there a directory
> /home/CB/bin/builds/gnucash/build-gnucash-3.7/lib/gnucash with several
> libraries whose names start with libgncmod ?
> There should be at least a libgncmod-backend-xml.so and libgncmod-
> backend.dbi.so.
>
> Regards,
>
> Geert
>
I forgot to mention that even on my system the example scripts don't work
fully trouble free. Most of them end with an abort due to a double free. It
looks like the python bindings are in need of some attention...
Regards,
Geert
More information about the gnucash-user
mailing list