Bug 460904 - Several Images can´t be imported from the network and files are not marked as downloaded
Summary: Several Images can´t be imported from the network and files are not marked as...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: AdvancedRename-Import (other bugs)
Version First Reported In: 7.9.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-23 20:00 UTC by sieber.an
Modified: 2023-05-14 06:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.1.0
Sentry Crash Report:


Attachments
Digikam Log from 2023_02_05 (1.82 MB, text/plain)
2023-02-05 21:22 UTC, sieber.an
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sieber.an 2022-10-23 20:00:27 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT
Several Images can´t be imported from SD card and imported pictures are not marked as downloaded

EXPECTED RESULT
Images will be imported and marked as downloaded

SOFTWARE/OS VERSIONS
Windows: 11


ADDITIONAL INFORMATION
Database is stored via MySQL and pictures are located on network drive
Comment 1 sieber.an 2022-10-23 20:06:54 UTC
Just copied the pictures to the local disk and tried again but get the same error. Is there a log somewhere with more detailed information?
Comment 2 caulier.gilles 2022-10-23 20:25:29 UTC
Install DebugView from Microsoft and follow the instructions from there :

https://www.digikam.org/contribute/

Best regards

Gilles Caulier
Comment 3 sieber.an 2022-10-24 02:21:37 UTC
(In reply to caulier.gilles from comment #2)
> Install DebugView from Microsoft and follow the instructions from there :
> 
> https://www.digikam.org/contribute/
> 
> Best regards
> 
> Gilles Caulier

Here is the debug output of three files that do not work:

[25240] digikam.general: new search text settings: "" : hasResult = true , validRows = 216
[25240] digikam.import: Did not identify a valid mount point for "//192.168.178.3/photo"
[25240] digikam.import: autorotating for  QUrl("file://192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T1003221.JPG")
[25240] digikam.import: autorotating for  QUrl("file://192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T1003282.JPG")
[25240] digikam.import: autorotating for  QUrl("file://192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T1003343.JPG")
[25240] digikam.import: Downloading:  "_DSC6153.JPG"  using  "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6153.JPG"
[25240] digikam.import: Set metadata from:  "_DSC6153.JPG"  using  "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6153.JPG"
[25240] digikam.metaengine: Loading metadata with "Exiv2" backend from "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6153.JPG"
[25240] digikam.import: Metadata template title :  "_REMOVE_TEMPLATE_"
[25240] digikam.metaengine: MetaEngine::metadataWritingMode 0
[25240] digikam.metaengine: Will write Metadata to file "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6153.JPG"
[25240] digikam.metaengine: wroteComment:  true
[25240] digikam.metaengine: wroteEXIF:  true
[25240] digikam.metaengine: wroteIPTC:  true
[25240] digikam.metaengine: wroteXMP:  true
[25240] digikam.metaengine: Metadata for file "Camera-tmp1-25240.digikamtempfile._DSC6153.JPG" written to file.
[25240] digikam.import: Log ( "_DSC6153.JPG"   "D:/DCIM/100MSDCF/" :  "Datei umbenennen zu „20221023T1003221_v1.JPG“"
[25240] digikam.import: Renaming  "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6153.JPG"  to  "//192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T1003221_v1.JPG"  failed
[25240] digikam.import: Log ( "_DSC6153.JPG"   "D:/DCIM/100MSDCF/" :  "Fehler beim Herunterladen der Datei „_DSC6153.JPG“"
[25240] digikam.import: Downloading:  "_DSC6154.JPG"  using  "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6154.JPG"
[25240] digikam.import: Set metadata from:  "_DSC6154.JPG"  using  "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6154.JPG"
[25240] digikam.metaengine: Loading metadata with "Exiv2" backend from "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6154.JPG"
[25240] digikam.import: Metadata template title :  "_REMOVE_TEMPLATE_"
[25240] digikam.metaengine: MetaEngine::metadataWritingMode 0
[25240] digikam.metaengine: Will write Metadata to file "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6154.JPG"
[25240] digikam.metaengine: wroteComment:  true
[25240] digikam.metaengine: wroteEXIF:  true
[25240] digikam.metaengine: wroteIPTC:  true
[25240] digikam.metaengine: wroteXMP:  true
[25240] digikam.metaengine: Metadata for file "Camera-tmp1-25240.digikamtempfile._DSC6154.JPG" written to file.
[25240] digikam.import: Log ( "_DSC6154.JPG"   "D:/DCIM/100MSDCF/" :  "Datei umbenennen zu „20221023T1003282_v1.JPG“"
[25240] digikam.import: Renaming  "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6154.JPG"  to  "//192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T1003282_v1.JPG"  failed
[25240] digikam.import: Log ( "_DSC6154.JPG"   "D:/DCIM/100MSDCF/" :  "Fehler beim Herunterladen der Datei „_DSC6154.JPG“"
[25240] digikam.import: Downloading:  "_DSC6155.JPG"  using  "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6155.JPG"
[25240] digikam.import: Set metadata from:  "_DSC6155.JPG"  using  "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6155.JPG"
[25240] digikam.metaengine: Loading metadata with "Exiv2" backend from "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6155.JPG"
[25240] digikam.import: Metadata template title :  "_REMOVE_TEMPLATE_"
[25240] digikam.metaengine: MetaEngine::metadataWritingMode 0
[25240] digikam.metaengine: Will write Metadata to file "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6155.JPG"
[25240] digikam.metaengine: wroteComment:  true
[25240] digikam.metaengine: wroteEXIF:  true
[25240] digikam.metaengine: wroteIPTC:  true
[25240] digikam.metaengine: wroteXMP:  true
[25240] digikam.metaengine: Metadata for file "Camera-tmp1-25240.digikamtempfile._DSC6155.JPG" written to file.
[25240] digikam.import: Log ( "_DSC6155.JPG"   "D:/DCIM/100MSDCF/" :  "Datei umbenennen zu „20221023T1003343_v1.JPG“"
[25240] digikam.import: Renaming  "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6155.JPG"  to  "//192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T1003343_v1.JPG"  failed
[25240] digikam.import: Log ( "_DSC6155.JPG"   "D:/DCIM/100MSDCF/" :  "Fehler beim Herunterladen der Datei „_DSC6155.JPG“"
[25240] digikam.database: No location could be retrieved for ""
Comment 4 caulier.gilles 2022-10-24 04:40:26 UTC
Look These king of messages for ex appear while renaming file from camera:

25240] digikam.import: Renaming
"//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.digikamtempfile._DSC6154.JPG"
 to  "//192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T1003282_v1.JPG"
failed
[25240] digikam.import: Log ( "_DSC6154.JPG"   "D:/DCIM/100MSDCF/" :  "Fehler
beim Herunterladen der Datei „_DSC6154.JPG“"

Why there is an IP address in the file path ? 

Gilles
Comment 5 Maik Qualmann 2022-10-24 06:07:09 UTC
The temporary download of the file and write metadata worked. Attempting to rename to a "*_v1.JPG" file because presumably the file has already been downloaded and already exists. Why renaming fails is not clear.
The import process has been heavily revised for digiKam-8.0.0, I will test it today with a network drive with UNC path as collection.

Maik
Comment 6 sieber.an 2022-10-24 07:51:19 UTC
(In reply to caulier.gilles from comment #4)
> Look These king of messages for ex appear while renaming file from camera:
> 
> 25240] digikam.import: Renaming
> "//192.168.178.3/photo/Kamera_Import/2022-10-23/Camera-tmp1-25240.
> digikamtempfile._DSC6154.JPG"
>  to  "//192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T1003282_v1.JPG"
> failed
> [25240] digikam.import: Log ( "_DSC6154.JPG"   "D:/DCIM/100MSDCF/" :  "Fehler
> beim Herunterladen der Datei „_DSC6154.JPG“"
> 
> Why there is an IP address in the file path ? 
> 
> Gilles

The IP Adresse is the adress of the network storage, shared via SMB.
Andreas
Comment 7 sieber.an 2022-10-24 07:56:12 UTC
(In reply to Maik Qualmann from comment #5)
> The temporary download of the file and write metadata worked. Attempting to
> rename to a "*_v1.JPG" file because presumably the file has already been
> downloaded and already exists. Why renaming fails is not clear.
> The import process has been heavily revised for digiKam-8.0.0, I will test
> it today with a network drive with UNC path as collection.
> 
> Maik

Just checked on the network drive, I had files there which digikam did not properly recognize. Just cleaned up the whole folder via digikam. Digikam moved the files to .dtrash but did not remove them from the database. I can still select them and get the following error message which is an expected result.

[25240] digikam.general: Try to get preview from "//192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T0933301.JPG"
[25240] digikam.general: Preview quality:  2
[25240] digikam.dimg: File "//192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T0933301.JPG" does not exist
[25240] digikam.general: Cannot extract preview for "//192.168.178.3/photo/Kamera_Import/2022-10-23/20221023T0933301.JPG"
[25240] digikam.general: Stacked View Mode :  1
[25240] digikam.general: FocusPointsGroup: no Point to load

Looks like there are more issues related to network shares.
Comment 8 sieber.an 2023-01-14 07:37:18 UTC
Still not working with version 7.9
Comment 9 Maik Qualmann 2023-01-14 10:41:45 UTC
I took a closer look at the log. Your source and target is the same folder "//192.168.178.3/photo/Camera_Import/2022-10-23/".
So you're trying to import images from your already included collection? Please a complete log from the beginning of the start of digiKam.

Maik
Comment 10 sieber.an 2023-02-05 21:22:34 UTC
Created attachment 155983 [details]
Digikam Log from 2023_02_05
Comment 11 sieber.an 2023-02-05 21:23:09 UTC
(In reply to Maik Qualmann from comment #9)
> I took a closer look at the log. Your source and target is the same folder
> "//192.168.178.3/photo/Camera_Import/2022-10-23/".
> So you're trying to import images from your already included collection?
> Please a complete log from the beginning of the start of digiKam.
> 
> Maik

(In reply to Maik Qualmann from comment #9)
> I took a closer look at the log. Your source and target is the same folder
> "//192.168.178.3/photo/Camera_Import/2022-10-23/".
> So you're trying to import images from your already included collection?
> Please a complete log from the beginning of the start of digiKam.
> 
> Maik

Hi Maik,
Here is a fresh import, this time from my local HDD to my network share to exclude SD card issues, I did it at first without debugview. No picture has been imported to digikam but all 18 files have been copied to my file share. So I removed the 18 pictures completely.

2nd try (18 pictures) with debug view turned on and "download selected and delete afterwards": All pictures have been added to digikam and copied to file share. No dialog for deletion. A few pictures have gotten a "checkmark" others not in the import window, so maybe this "explains" the missing dialog for deletion.

3rd try with remaining 182 pictures, debug view turned on and "download selected and delete afterwards": All pictures have been imported properly (beside the below mentioned date issue 29.01.2023 instead of 28.02.2023) but I had to wait a few minutes until they showed up properly. Status bar mentioned "failures (Fehler beim Herunterladen der Datei)".

!!Another side issue: Taken date of these pictures is 28.01.2023 but the folder is named as date 29.01.2023!!

See attachment "Digikam Log from 2023_02_05" for the detailed log.
Comment 12 Maik Qualmann 2023-02-06 07:15:45 UTC
Please test digiKam-8.0.0-Beta1 if the problem can be reproduced. The import process has been heavily revised. Also the problem with wrong folder date. The date problem can also be fixed in digiKam-7.x.x by activating the reading of metadata during import (makes the connection slower) under digiKam Setup-> Camera-> Behavior.
With the failed file, I suspect from the log that when renaming, the file already exists in the target.
As said, please test digiKam-8.0.0-Beta1, if you want to go back to an older digiKam version, make a backup of the databases.

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

Maik
Comment 13 caulier.gilles 2023-05-03 03:58:17 UTC
@sieber.an@gmail.com

digiKam 8.0.0 is out. This entry still valid with this release ?

Best regards

Gilles Caulier
Comment 14 caulier.gilles 2023-05-13 19:15:56 UTC
@sieber.an@gmail.com

We needs a fresh feedback about this file using last 8.0.0.

Thanks in advance

Gilles Caulier
Comment 15 sieber.an 2023-05-14 05:46:22 UTC
Looks promising so far. Did several Imports and they seemed top be okay.