rcw-2 / python-digikamdb

Python library to access Digikam metadata
MIT License
11 stars 0 forks source link

No path for Mountpoint in album.abspath #7

Closed rokdd closed 3 months ago

rokdd commented 5 months ago

I made the "mistake" to try Digikam 8.3.0 and I assume that is the reason. When I query for the albums I get the following:

 File "/home/x/.../main.py", line 138, in tags_files_dk
    print("Album:",album.id, album.caption, album.abspath)
                                            ^^^^^^^^^^^^^
  File "home/x/.../.venv/lib/python3.11/site-packages/digikamdb/albums.py", line 152, in abspath
    return self.root.abspath
           ^^^^^^^^^^^^^^^^^
  File "home/x/.../.venv/lib/python3.11/site-packages/digikamdb/albumroots.py", line 220, in abspath
    self.mountpoint,
    ^^^^^^^^^^^^^^^
  File "home/x/...//.venv/lib/python3.11/site-packages/digikamdb/albumroots.py", line 195, in mountpoint
    raise DigikamFileError(
digikamdb.exceptions.DigikamFileError: No path found for volumeid:?uuid=a73399b0-bbb6-414c-90af-c38f2c132d41&fileuuid=f78abb57-6f3a-44b4-bc34-0c24d05b8cdc, candidate None

I checked the volume_id and it is the same as in Disk in Ubuntu listed (my main partition and I also never changed something with partitions). What might be wrong? I saw also the following issue https://github.com/rcw-2/python-digikamdb/issues/3 but I assume it is another problem / topic.

rcw-2 commented 5 months ago

The &fileuuid= seems to be something new, so digikam-db doesn't understand it. I haven't gotten around to look at the Digikam 8.x database structure yet, so fixing this may take a while. As a workaround, you can add a root_overide option to the Digikam constructor:


dk = Digikam(
    dbspec,
    root_override = {
        'volumeid:?uuid=a73399b0-bbb6-414c-90af-c38f2c132d41&fileuuid=f78abb57-6f3a-44b4-bc34-0c24d05b8cdc': '/path/to/images'
    }
)```
rokdd commented 5 months ago

I will wait.. the root_override did not work. Thanks for fixing it

rcw-2 commented 3 months ago

Should be fixed in Digikam-DB 0.3.4. The fileuuid is ignored in this version.

rokdd commented 3 months ago

Thank you great, it is working again (y)