[GNC] Python Error

David Cousens davidcousens49 at gmail.com
Sun Jul 18 19:04:53 EDT 2021


Robin

Did you build GnuCash from source or use the flatpack? If the former did you
include the switch "-DWITH_PYTHON=ON" in the cmake command when building?

David Cousens
 
On Sun, 2021-07-18 at 17:29 -0500, Robin Chattopadhyay wrote:
> Ubuntu 20.04 LTS
> Gnucash 4.6
> 
> After upgrading to 4.6 my Python script broke and I'm not sure what to do
> to fix it.
> 
> It's failing at "import gnucash" with:
> 
> Traceback (most recent call last):
>   File
> "/home/robin/.local/lib/python3.8/site-packages/gnucash/gnucash_core_c.py",
> line 14, in swig_import_helper
>     return importlib.import_module(mname)
>   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in
> import_module
>     return _bootstrap._gcd_import(name[level:], package, level)
>   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
>   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
>   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
>   File "<frozen importlib._bootstrap>", line 657, in _load_unlocked
>   File "<frozen importlib._bootstrap>", line 556, in module_from_spec
>   File "<frozen importlib._bootstrap_external>", line 1166, in create_module
>   File "<frozen importlib._bootstrap>", line 219, in
> _call_with_frames_removed
> ImportError:
> /home/robin/.local/lib/python3.8/site-packages/gnucash/_gnucash_core_c.so:
> undefined symbol: gnc_pricedb_lookup_latest_before_t64
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/home/robin/.local/lib/python3.8/site-packages/gnucash/__init__.py", line
> 6, in <module>
>     from gnucash.gnucash_core import *
>   File
> "/home/robin/.local/lib/python3.8/site-packages/gnucash/gnucash_core.py",
> line 34, in <module>
>     from gnucash import gnucash_core_c
>   File
> "/home/robin/.local/lib/python3.8/site-packages/gnucash/gnucash_core_c.py",
> line 17, in <module>
>     _gnucash_core_c = swig_import_helper()
>   File
> "/home/robin/.local/lib/python3.8/site-packages/gnucash/gnucash_core_c.py",
> line 16, in swig_import_helper
>     return importlib.import_module('_gnucash_core_c')
>   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in
> import_module
>     return _bootstrap._gcd_import(name[level:], package, level)
> ModuleNotFoundError: No module named '_gnucash_core_c'
> _______________________________________________
> 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
> If you are using Nabble or Gmane, please see 
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



More information about the gnucash-user mailing list