[GNC] Python bindings issue
Gere Kiss Zsolt
zsolt.gkiss at gmail.com
Tue Aug 13 18:14:00 EDT 2024
Hi Jim,
and thanks for the response.
> I too am someone who has used GnuCash from the UI from several years,
and is now starting to try using the Python bindings. I am on macOS
rather than Linux.
Did you succeed to import the Python bindings with `import gnucash`?
> Suggestion 1: is the OS package python3-gnucash installed on your system?
Sure, as I mentioned:
Other gnucash related OS packages:
>
> - gnucash-common
> - gnucash-docs
> - *python3-gnucash*
>
>
> Suggestion 2: what info about python3-gnucash does the apt system
display (in the same way it displayed information about the package
gnucash)?
Package: python3-gnucash
Version: 1:4.8-1build2
State: installed
Section: universe/python
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Architecture: amd64
Depends: libc6 (>= 2.14), libglib2.0-0 (>= 2.12.0), libpython3.10 (>=
3.10.0), python3 (< 3.11), python3 (>= 3.10~), python3:any
As you can see from Depends, it installs bindings for python3 >= 3.10~ <
3.11.
3.10.12 is the version of Python3 installed on my OS, so this should
conform (no wonder, since it is an OS package). Maybe some other libraries
(like libc6?, etc.) are incompatible between gnucash and python3-gnucash?
Can you do `import gnucash` from a Python REPL?
Thanks,
Zsolt
On Tue, 13 Aug 2024 at 22:05, Jim DeLaHunt <list+gnucash at jdlh.com> wrote:
> Hello, Zsolt:
>
> On 2024-08-13 10:26, Gere Kiss Zsolt wrote:
> > Hi all,
> >
> > I've been using GnuCash for several years now and I'd like to try some
> > Python bindings to enter transactions programmatically.
> ...[details elided]...
> > Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] on linux
> > Type "help", "copyright", "credits" or "license" for more information.
> >>>> import gnucash
> > * 11:41:04 ERROR <GLib> g_variant_unref: assertion 'value != NULL' failed
> >
> > Can somebody give me a clue about what I can do about it?
>
> I too am someone who has used GnuCash from the UI from several years,
> and is now starting to try using the Python bindings. I am on macOS
> rather than Linux. Since I am just starting out, maybe my help is just
> the blind leading the blind.
>
> Suggestion 1: is the OS package python3-gnucash installed on your system?
>
> Suggestion 2: what info about python3-gnucash does the apt system
> display (in the same way it displayed information about the package
> gnucash)?
>
> Suggestion 3: did the package python3-gnucash install libraries for a
> specific version of Python, or for all versions of Python? (In my
> situation, using the MacPorts distribution on MacOS, the package gnucash
> installs the Python bindings specifically for Python 3.11, not for all
> versions.)
>
> Do those answers shed any light for you?
>
> Best regards, —Jim DeLaHunt
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
--
Üdvözlettel,
Zsolt
---------------------------------------------------------------------------------------------------
„We have two lives, and the second begins when we realize we only have one.”
-- Confucius
More information about the gnucash-user
mailing list