This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Open sqlite database under kmymoney versions >= 5.0

Tags: None
(comma "," separated)
photomike
Registered Member
Posts
12
Karma
0
Hello, I've been using kmymoney for over eight years now. A few years ago I decided to use sqlite as my database to store my data.
This was no problem until recently, but then I switched from OpenSuSE Leap 42.3 (kmymoney 4.7?) to Leap 15.1 (kmymoney 5.02) or OpenSuSE Tumbleweed (kmymoney 5.04).
With both versions it is no longer possible for me to open my database, error message: "The data source cannot be read. Check in the settings for KMyMoney that the required module is installed". I checked that, the SQL Storage module is installed.

What do I have to do so that my DB can be opened again by kmymoney?
The DB itself is OK and can be opened e.g. with sqlitebrowser, I can see all data with it.

Many thanks in advance
photomike
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
This sounds similar to an error message we have when a file cannot be opened. This message is
Could not read your data source. Please check the KMyMoney settings that the necessary plugin is enabled.

Could it be, that you see this message? If this is the case, goto the KMyMoney settings dialog, select the plugin page (towards the bottom of the list) and make sure the SQL storage plugin is activated. Then you should be able to open your database.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
photomike
Registered Member
Posts
12
Karma
0
Hello ipwizard,

that's probably the message I see. I translated it from German, so it fits not exactly.

As I wrote in my initial post the plugin SQL Storage is already activated.
There must be another problem.

Thanks
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Ah, the good old German ;)

Can you post what you see when you start KMyMoney in a terminal window? There should be a list of located plugins and their loading process. Can you post the output here?


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
photomike
Registered Member
Posts
12
Karma
0
Hi ipwizard,

here's the console output, as I can see sqlstorage is loaded successfully.

michael@linux-x79k:~> kmymoney
WebConnect: Try to connect to WebConnect server
WebConnect: Connect to server failed
WebConnect: Running in server mode
Located plugin "/usr/lib64/qt5/plugins/kmymoney/ofximporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/qifexporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_reportsview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/konlinetasks_sepa.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/sqlstorage.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/forecastview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/csvexporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_forecastview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_csvimporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/onlinejoboutboxview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/qifimporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kbanking.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/icalendarexporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/gncimporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_checkprinting.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/reportsview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_qif.so" Validity false
Located plugin "/usr/lib64/qt5/plugins/kmymoney/reconciliationreport.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/xmlstorage.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/csvimporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/checkprinting.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/budgetview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_icalendarexporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_xmlstorage.so" Validity true
Loading "/usr/lib64/qt5/plugins/kmymoney/budgetview.so"
Plugins: budgetview loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/checkprinting.so"
Plugins: checkprinting loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/csvexporter.so"
Plugins: csvexporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/csvimporter.so"
Plugins: csvimporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/forecastview.so"
Plugins: forecastview loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/gncimporter.so"
Plugins: gncimporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/icalendarexporter.so"
Plugins: icalendarexporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/kbanking.so"
Plugins: kbanking loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/ofximporter.so"
Plugins: ofximporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/onlinejoboutboxview.so"
Plugins: onlinejoboutboxview loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/qifexporter.so"
Plugins: qifexporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/qifimporter.so"
Plugins: qifimporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/reconciliationreport.so"
Plugins: reconciliation report loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/reportsview.so"
Plugins: reportsview loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/sqlstorage.so"
Plugins: sqlstorage loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/xmlstorage.so"
Plugins: xmlstorage loaded
Unknown view '' in slotOpenURL()
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
That looks ok. Everything is found and loaded. What is the output if you run
file <your-sql-file>

on the command line?


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
photomike
Registered Member
Posts
12
Karma
0
Hello ipwizard

here the requested info:

michael@linux-x79k:~/Documents/KMyMoney> file KMyMoney
KMyMoney: SQLite 3.x database, last written using SQLite version 3008010

Thanks for helping
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Fortunately, I do have an openSUSE 15.1 on my desk which comes with KMyMoney 5.0.4. Finally, I was able to duplicate your problem.

KMyMoney supports various ways to start a session which is selected by the argument supplied on the command line:
  1. no argument: KMyMoney uses the last file opened
  2. -n: KMyMoney does not open any file and just starts
  3. filename: KMyMoney opens that file
The strange thing here is, that for XML files all three methods work but for SQL files 3.) is showing the problem you encounter. The other two work as expected.
Workaround: start KMyMoney with option -n and then use File/Open database (ok: Datei/Datenbank öffnen) to get access to your data. I opened a bug entry for this to be fixed. Until then, use the workaround.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Actually, it works as expected. It's just that for an SQL backend to be passed as argument, you need to provide a full URL and not only the filename. Example:

kmymoney sql://user@localhost//home/user/fn.sql?driver=QSQLITE.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
photomike
Registered Member
Posts
12
Karma
0
Hi,

I'm sorry that I don't understand. What must it look like in my case?

This does not work:
/home/michael/Documents/KMyMoney/KMyMoney sql://user@localhost//home/user/fn.sql?driver=QSQLITE
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Being on the command line, you enter

Sorry, the forum shortens the information. Use the 'copy link location' of your browser to the the full text. In general, replace 'user' in my example with 'michael' and 'fn.sql' with 'Documents/KMyMoney/KMyMoney'. That should do the trick. Another way of getting to that information is to start KMyMoney with option -n, then use the open database feature to open your DB. Quit KMyMoney and restart it without any argument. Then take a look at the list at File/Open recent. The full URL is presented in parenthesis for your SQLite file.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
photomike
Registered Member
Posts
12
Karma
0
Sorry does not work, drives me crazy :-\

michael@linux-x79k:~> kmymoney sql://michael@localhost///home/michael/ ... er=QSQLITE
WebConnect: Try to connect to WebConnect server
WebConnect: Connect to server failed
WebConnect: Starting server failed. Try to remove stale socket.
WebConnect: Running in server mode
Located plugin "/usr/lib64/qt5/plugins/kmymoney/ofximporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/qifexporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_reportsview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/konlinetasks_sepa.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/sqlstorage.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/forecastview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/csvexporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_forecastview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_csvimporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/onlinejoboutboxview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/qifimporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kbanking.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/icalendarexporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/gncimporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_checkprinting.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/reportsview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_qif.so" Validity false
Located plugin "/usr/lib64/qt5/plugins/kmymoney/reconciliationreport.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/xmlstorage.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/csvimporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/checkprinting.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/budgetview.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_icalendarexporter.so" Validity true
Located plugin "/usr/lib64/qt5/plugins/kmymoney/kcm_xmlstorage.so" Validity true
Loading "/usr/lib64/qt5/plugins/kmymoney/budgetview.so"
Plugins: budgetview loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/checkprinting.so"
Plugins: checkprinting loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/csvexporter.so"
Plugins: csvexporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/csvimporter.so"
Plugins: csvimporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/forecastview.so"
Plugins: forecastview loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/gncimporter.so"
Plugins: gncimporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/icalendarexporter.so"
Plugins: icalendarexporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/kbanking.so"
Plugins: kbanking loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/ofximporter.so"
Plugins: ofximporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/onlinejoboutboxview.so"
Plugins: onlinejoboutboxview loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/qifexporter.so"
Plugins: qifexporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/qifimporter.so"
Plugins: qifimporter loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/reconciliationreport.so"
Plugins: reconciliation report loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/reportsview.so"
Plugins: reportsview loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/sqlstorage.so"
Plugins: sqlstorage loaded
Loading "/usr/lib64/qt5/plugins/kmymoney/xmlstorage.so"
Plugins: xmlstorage loaded

QFSFileEngine::open: No file name specified
OFXImporter::isMyFormat: unable to open "" with "No file name specified"

Unknown view '' in slotOpenURL()
Plugins: budgetview unloaded
Plugins: checkprinting unloaded
Plugins: csvexporter unloaded
Plugins: csvimporter unloaded
Plugins: forecastview unloaded
Plugins: gncimporter unloaded
Plugins: icalendarexporter unloaded
Plugins: kbanking unpluged
Plugins: kbanking unloaded
Plugins: ofximporter unloaded
Plugins: onlinejoboutboxview unloaded
Plugins: qifexporter unloaded
Plugins: qifimporter unloaded
Plugins: reconciliation report unloaded
Plugins: reportsview unloaded
Plugins: sqlstorage unloaded
Plugins: xmlstorage unloaded
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
photomike wrote:Sorry does not work, drives me crazy :-\

Don't worry, me too :) . This is very strange.

photomike wrote:michael@linux-x79k:~> kmymoney sql://michael@localhost///home/michael/ ... er=QSQLITE
...

QFSFileEngine::open: No file name specified
OFXImporter::isMyFormat: unable to open "" with "No file name specified"

...

Strange, why is it trying to import your file into the OFX importer now? What is the output of
kmymoney -v

Did you ever try any of the mentioned workarounds to get access to your data?
If I use your full command line, I get an error message saying that:
Cannot open database sql://michael@localhost///home/michael/ ... er=QSQLITE
SQLite file ///home/michael/Documents/KMyMoney/KMyMoney does not exist

What happens if you start KMyMoney passing the URL of a non-existing database?


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
photomike
Registered Member
Posts
12
Karma
0
Hi ipwizard,
here the requested output.

michael@linux-x79k:~> kmymoney -v
kmymoney 5.0.4

I get the same message no matter whether the filename is correct or not.
The first file in the directory is the db I want to work with.

michael@linux-x79k:~> cd /home/michael/Documents/KMyMoney/
michael@linux-x79k:~/Documents/KMyMoney> ll
insgesamt 55220
-rw-r--r-- 1 michael users 12235776 7. Jul 13:16 KMyMoney
-rw-r--r-- 1 michael users 10459136 16. Nov 2016 KMyMoney_161104
-rw-r--r-- 1 michael users 10849280 7. Mai 2017 KMyMoney_170424
-rw-r--r-- 1 michael users 11238400 30. Mär 2018 KMyMoney_171019
-rw-r--r-- 1 michael users 11751424 9. Okt 2018 KMyMoney_180812
-rw-r--r-- 1 michael users 2576 7. Jul 13:16 KMyMoney-journal

Trying to open with the workaround didn't work either.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Can you try the stable AppImage version? The AppImage is build daily and contains the latest changes over a stock 5.0.4. It is therefore also a bit closer to what I have here (bleeding edge). We need to figure out what is going on there.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]