Hi John/GnuCash users, 

https://fedoraproject.org/ - it looks like the current version of Fedora
is 41 (not 39), but I do not know if that plays a role in the issues you
are describing...? 

What version of Python are you using? https://www.python.org/downloads/
- it looks like the current version is 3.13 

Another option might be the Flatpak version of GNUCash -
https://flathub.org/apps/org.gnucash.GnuCash 

---
Thanks, 

Brad - https://www.facebook.com/brad.morrison.12327/ &
https://norcal.social/@BradMorrison 

On 2024-11-30 10:55, John Haiducek wrote:

> Hi,
> 
> A Python script I've been using with Gnucash recently stopped working, and
> is no longer able to read files that could be read previously with the same
> script. The script can open Gnucash XML files, but it doesn't find the
> accounts in them. The script uses the official Gnucash Python API. Both
> Gnucash and the Python bindings were installed using the Fedora package
> manager.
> 
> Here's the script:
> 
> ```
> from sys import argv
> from gnucash import Session, SessionOpenMode
> 
> def account_from_path(top_account, account_path, original_path=None):
> if original_path==None: original_path = account_path
> account, account_path = account_path[0], account_path[1:]
> 
> account = top_account.lookup_by_name(account)
> if account == None:
> raise Exception(
> "path " + ':'.join(original_path) + " could not be found")
> 
> if len(account_path) > 0 :
> return account_from_path(account, account_path, original_path)
> else:
> return account
> 
> if __name__=='__main__':
> 
> gnucash_file = argv[1]
> 
> gnucash_session=Session(gnucash_file, SessionOpenMode.SESSION_READ_ONLY)
> 
> root_account = gnucash_session.book.get_root_account()
> 
> investments = account_from_path(root_account, ['Assets','Investments'])
> ```
> 
> I'm experiencing this with Gnucash 5.9 on Fedora 39, installed using the
> Fedora repositories. I'm not sure how to tell whether this is a Gnucash
> bug, or a packaging error on the Fedora side, or something else. Any
> suggestions for diagnosing or troubleshooting this?
> 
> John
> _______________________________________________
> gnucash-user mailing list
> gnucash-user@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.
_______________________________________________
gnucash-user mailing list
gnucash-user@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.

Reply via email to