Bug 435507 - New install digiKam 7.2 on Windows Error opening database
Summary: New install digiKam 7.2 on Windows Error opening database
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Engine (show other bugs)
Version: 7.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-08 13:58 UTC by mike@newmikeman.co.uk
Modified: 2021-10-26 16:48 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.4.0


Attachments
debug log (79.86 KB, text/plain)
2021-04-08 15:41 UTC, mike@newmikeman.co.uk
Details
The sqlite core database was not found (4.15 KB, image/png)
2021-10-19 03:45 UTC, Joel
Details
Select sqlite database location (13.71 KB, image/png)
2021-10-19 03:46 UTC, Joel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mike@newmikeman.co.uk 2021-04-08 13:58:06 UTC
SUMMARY
New install of digiKam 7.2.0 on Windows 10 - Error opening database even before digiKam has got itself going.

STEPS TO REPRODUCE
1. Install digiKam 7.2.0 on Windows 10
    Used digiKam-7.2.0-Win64.exe then digiKam-7.2.0-Win64.tar.xz in case 
    the issue was about anti-malware.
2. Run digiKam
3. Pop-up "Error while opening the database. digiKam will try to automatically connect to the database". There's a progress bar going on and on. Click on Cancel (no other choice).
4. Further pop-up "Failed to open the database. You cannot use digiKam without a working database. digiKam will attempt to start now, but it will not be functional. Please check the database settings in the configuration menu."
Click on OK (no other choice)
5. Small splash screen showing a rural scene stays around for a little while then vanishes.

OBSERVED RESULT
No program running.
If digiKam can't find its database one would expect a grown-up software to name the missing database and to start with an empty one or a choice of that or to browse to the right one.

EXPECTED RESULT
Running program something like the screen shots published on the Internet.

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I tried digiKam 6.4 a few years ago and had uninstalled it; I don't know whether or why that would make any difference.
Comment 1 caulier.gilles 2021-04-08 15:12:29 UTC
Can you share the DebugView log when digiKam start ?

Look here for details : https://www.digikam.org/contribute/

Gilles Caulier
Comment 2 Maik Qualmann 2021-04-08 15:27:41 UTC
Also try the current test version of digiKam-7.3.0. This shows a dialog if the path to the SQLite database is no longer correct.

https://files.kde.org/digikam/

Maik
Comment 3 mike@newmikeman.co.uk 2021-04-08 15:41:45 UTC
Created attachment 137435 [details]
debug log

Here's the debug log you asked for.
Comment 4 mike@newmikeman.co.uk 2021-04-08 15:45:30 UTC
I don't recognise "D:/FamFotoData" and D: is a spare drive letter that often gets assigned to a USB key or an SD card reader.
Where would digikam get that from?
Comment 5 mike@newmikeman.co.uk 2021-04-08 15:53:48 UTC
The file "C:\\Users\\mnewm\\AppData\\Local\\digikam_crash.log" is not there.
There is a 40KB file "C:\\Users\\mnewm\\AppData\\Local\\digikamrc" dated 26/05/2020 and it contains text. I searched for and found "D:/FamFotoData/" in there, so that explains something but I'm not getting the program running yet!
Comment 6 Maik Qualmann 2021-04-08 16:19:31 UTC
Install the current digiKam-7.3.0 from here:

https://files.kde.org/digikam/

This version gives you the opportunity to set the correct folder for your digikam4.db file at the start. Alternatively, you can rename or delete digikamrc and start with a completely new configuration.

Maik
Comment 7 mike@newmikeman.co.uk 2021-04-08 16:32:25 UTC
Thanks for the 7.3.0 link and I have installed that version. 
It still insisted that I provide a database and didn't give me the option to create a fresh one.
Fortunately I seem to have found a set of database files left over from the last time I did an evaluation of digiKam. 
So now the install seems to have completed, including the download of some files related to face recognoition.
Thank you both Gilles & Maik for your prompt support and for the instant update!
I'll keep this in mind while I'm evaluating digiKam this time. I'm a Lightroom user and it has never satisfied me in the area of keyword tagging. Hopefully digiKam will do better this time. Along with my other key requirement areas of geotagging, quick edits and external edits using the likes of Affinity, Luminar AI, Topaz Denoise and Sharpen.
Let's close this bug in a few days just to give me time to be sure I didn't trip over something else in the installation.
Kind regards / bien cordialement
Mike
Comment 8 Joel 2021-10-19 03:45:36 UTC
Created attachment 142598 [details]
The sqlite core database was not found
Comment 9 Joel 2021-10-19 03:46:01 UTC
Created attachment 142599 [details]
Select sqlite database location
Comment 10 Joel 2021-10-19 03:48:27 UTC
Please do not close this issue...There is still a problem here.

It looks like the only reason the OP was able to get digiKam started was they happened to have db files from an old digiKam installation laying around.

I'm trying to install digiKam for first time on Windows 10. 

I'm attaching the dialog that pops up 
"The Sqlite core database was not found, please set the correct location in the next dialog"

The next dialog allows a folder to be selected on my hard drive. 

However, no matter what folder I choose, it just continues to loop back to the first dialog "The sqlite core database was not found..."

So it is impossible to get digiKam to open up at this moment, on a new install on Windows 10. 

Is there any other information I can provide that would help troubleshoot this bug?
Comment 11 Maik Qualmann 2021-10-19 06:18:51 UTC
Use digiKam-7.3.0. Delete C:\Users\%USERNAME%\AppData\Local\digikamrc. And start again with the initial setup. You canceled an initial setup, a config exists but the database does not yet exist. The error message is intended to give the user an opportunity to enter the correct path in the event of later problems with the database.

Maik
Comment 12 Joel 2021-10-19 12:50:42 UTC
(In reply to Maik Qualmann from comment #11)
> Use digiKam-7.3.0. Delete C:\Users\%USERNAME%\AppData\Local\digikamrc. And
> start again with the initial setup. You canceled an initial setup, a config
> exists but the database does not yet exist. The error message is intended to
> give the user an opportunity to enter the correct path in the event of later
> problems with the database.
> 
> Maik

The only contents in C:\Users\%USERNAME%\AppData\Local\digikamrc is an empty directory called "cache". 

I also tried uninstalling digiKam and re-installing, and the same error occurs.

Are there any other files somewhere that can be manually removed?
Comment 13 Maik Qualmann 2021-10-19 14:43:03 UTC
In ...\AppData\Local there is a folder "digikam" but also a file "digikamrc".

Maik
Comment 14 Maik Qualmann 2021-10-19 19:58:49 UTC
I have now tested all initial installations of digiKam-7.2.0-7.4.0, everything works as expected.
A note, the usual reinstallation does not bring any success with digiKam because the installer does not change the digiKam's configuration files. This is by intended so that new versions can be installed without problems. The OP had installed and deleted a digiKam-6.4.0 version, the digikamrc is retained, so the error message is correct and intended. If a new installation is desired, the digikamrc has to be deleted manually, that is by intended. I close the bug.

Maik
Comment 15 Joel 2021-10-19 20:23:54 UTC
Can I give a suggestion, that in this scenario that the user is doing a new installation, after having removed an old version, that the prompt also explains that if there is no pre-existing database to use, the user must delete the digikamrc file manually? As of now, there is no way the user would be able to figure this out.
Comment 16 Maik Qualmann 2021-10-19 20:30:29 UTC
We can add a note that the user has to manually remove the configuration file so that an initial setup can be carried out again.

Maik
Comment 17 Maik Qualmann 2021-10-20 06:07:45 UTC
Git commit 2dfe86d31546f3e9e95c324b361471f21067998c by Maik Qualmann.
Committed on 20/10/2021 at 06:06.
Pushed by mqualmann into branch 'master'.

add a note about deleting the configuration file
FIXED-IN: 7.4.0

M  +6    -0    core/libs/album/manager/albummanager_database.cpp

https://invent.kde.org/graphics/digikam/commit/2dfe86d31546f3e9e95c324b361471f21067998c
Comment 18 Maik Qualmann 2021-10-26 16:48:39 UTC
*** Bug 444423 has been marked as a duplicate of this bug. ***