Gnucash 3.4 Crash - Python Eroor

I’m running openSUSE Tumbleweed with the Gnome Desktop. Everything is fully updated. Lately, when I try to run Gnucash, I get a Python error and the program exits. I’ve pasted the output below, but I don’t know what to do with it. Thanks for your help.

user@localhost:~> gnucash -v
GnuCash 3.4
Build ID:  3.4+ (2018-12-30)

user@localhost:~> gnucash
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>:<exec_prefix>]
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f5c58c30140 (most recent call first):
Aborted (core dumped)

First,
Did you install gnucash from an openSUSE repo or from somewhere else?
Also,
Was it working for awhile (how long?) and failed recently or is it a recent install?

TSU

I’m running gnucash 3.4-1.3-x86-64 from openSUSE-20181224-0 with priority 99 and vendor openSUSE. It’s been working fine for as long as I can remember (years), but just stopped working a few days ago. The only thing that has changed with my PC recently is software updates. Other than that, it’s the same system I’ve had running for months.

I have the exact same problem and same error messages. The gnucash bugzilla said it was not a gnucash problem, so I’m back here in the opensuse forum to ask for help.

Like the OP, I’ve used gnucash for years but it broke after a (large) Tumbleweed update a few days ago. It was installed from the TW repo via Discover, not from another source. I did not build it myself. KDE Plasma desktop.

Thanks.

If your TW is still 20181224 and you did have updates this means you did not use ‘zypper dup’ where you should have. Run

zypper dup

It’s probably related to the python update to python 3.7, and gnucash not rebuilt yet. Three options:

  • If on btrfs: snapper rollback to a previous snapshot
  • install tumbleweed-cli and move back to a previous tumbleweed release
  • File a bug against gnucash on bugzillla.opensuse.org

Thank you! Running “zypper dup” fixed the problem.

Considering I had this issue, what is the proper way to regularly upgrade an openSUSE system? I have 2 GUI options for updating: Package Updater (Gnome tool) and Online Update (YaST tool). I don’t know if one is better than the other. Then, of course, there’s CLI options: “zypper up” and “zypper dup”. When it comes time to do some updates, how do the pros do it? There’s too many options for idiots like me.

For TW zypper dup is the only way. FOr Leap best to use zypper up.

Note TW is cutting edge which can introduce problems sometime. They will eventually get worked out. If you have a mission critical needs best to use Leap.

The recent python upgrade in TW seems to have introduced problems for several dependent packages

As per your reply to the OP, zypper dup also fixed the problem for me. It did not work yesterday, but did today when a load of Python updates were applied.

Thanks for listing those three options. I’ll keep note of them for if/when this happens again the future.

Thanks for your help. It’s very much appreciated.