Perhaps I am the only one out there using the Python GnuCash bindings to load and manage accounting data, but just in case: the GnuCash 5.9 release has a bug that completely wipes out an accounting file when opened in a Python program. It's a good way to get an extreme adrenaline burst, but I really don't recommend it otherwise.
GnuCash fixed this upstream on October 26, but has not made a release with the fix, so my 5.9 Fedora version showed the bug in all its glory. I've submitted a bug there (
https://bugzilla.redhat.com/show_bug.cgi?id=2323303), hopefully they will include the fix soon. Meanwhile, I strongly recommend that anybody with GnuCash 5.9 installed be extra careful.