alvistar / immich-albums Goto Github PK
View Code? Open in Web Editor NEWCreate immich albums from folder structure
License: MIT License
Create immich albums from folder structure
License: MIT License
Hi,
I would appreciate if someone one push me in the right direction in order to figure out what I'm doing wrong. I've got the latest version of immich-albums, as well as versinon 1.106.4 of Immich server. I'm calling immich-albums with the command:
im --api-key xxxxxxxxxxxxxx --api-host http://192.168.115.2:2283/api --original-path "/mnt/qnap/Media/Markove fotografije" --replace-path "/external/Markove fotografije" .
I have masked the api-key above, obviously, but I'm using the api-key which I had previously generated on Immich server. The result I get is:
`
Album Markove fotografije does not exist
searching for: /external/Markove fotografije/.album
not found: /external/Markove fotografije/.album
Creating album Markove fotografije
Exception when calling create_album: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Server': 'openresty', 'Date': 'Thu, 27 Jun 2024 15:22:05 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '100', 'Connection': 'keep-alive', 'X-Powered-By': 'Express', 'x-immich-cid': 'rpt16pdn', 'ETag': '"64-uk9GwFOANWL25jGacOrQW0j712c"'})
HTTP response body: {"message":"Cannot POST /api/album","error":"Not Found","statusCode":404,"correlationId":"rpt16pdn"}
`
The original-path is the path on file system which contains subfolders with the photos, and the replace-path is the volume as seen from inside the Immich server docker.
What am I missing?!
I have 3 users each mapped to the same external library. I am still scanning the external library for 2 users, but for 1 user this is already done, and I successfully ran the command to create albums for this user. Will the .album
files create albums for the other 2 users? Or does this only work for 1 user?
I was going to just run the command again for another user, using their API key, but I realized this wouldn't work because I think immich-albums doesn't overwrite the .album
files. And if I deleted the .album
files for one user, then ran the command for another user, I would be deleting the albums for the first user.
Hello ! I am trying to use this script in order to create an album for each directory in my file system, the structure is the following
... (And about 200 more directories)
Is it possible to create an album with each folder ? Ideally each album would contain the files in all its children directories, but I guess this might not be possible.
I have encountered some issues with .DS_STORE files on MacOS (I have my photos mounted on SMB so it created this file every time I enter a directory)
I've added in im.py
line 89:
for filename in os.listdir(folder):
full_path = os.path.join(folder, filename)
+ ## If the file is hidden (starts with .) skip it or it doens't end with jpg, jpeg, raf, png, skip it
+ if filename.startswith('.') or not filename.lower().endswith(('.jpg', '.jpeg', '.raf', '.png')):
+ continue
if os.path.isfile(full_path):
replaced_path = full_path.replace(original_path, replace_path)
In order for it to skip my hidden/non photos files but I still get an issue :
Exception when calling create_album: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'X-Powered-By': 'Express', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '69', 'ETag': '"45-ZIXwJFYuB0um"', 'Date': 'Tue, 28 Nov 2023 17:58:08 GMT', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=5'})
HTTP response body: {"message":"Cannot POST /album","error":"Not Found","statusCode":404}
Creating .album
Have I done something wrong ? My library is mounted as an external library inside of Immich, but I mounted the/Photos
directory as read-only. Does immich create a .album
files / directories in order to create albums ?
Any help would be much appreciated
I wonder is this srcript can be used on WIndows i tired and i get the error "Error: Missing argument 'PATH'." If i add the "dot" at the end i get an exeption.
can I use this script to upload the files and create internal albums?
Otherwise I will have to review all photos for junk as external albums are read only, right?
2nd question if I may: what happens to photos which are in multiple albums or in the root folder(duplicates)?
I'm using latest Immich v1.105.1.
I'm trying to create the albums after importing my whole library but the process fails when trying to fetch a photo using the API because the name of the fullpath file is not correct.
I'm not 100% sure if the problem is the spaces in paths or the fact that the original files are mounted by NFS in my laptop.
As you can see the folder in local laptop is /home/ivanlm/qFotos/FotosTodas/20080100 - 7 meses Judith
but at the end of the log the call to get the first file fails because the spaces are substituted by %20
and that doesn't exist on the database.
HTTP response body: {"message":"Cannot GET /api/assets?originalPath=/data/photos/20080100%20-%207%20meses%20Judith/DSCN2108.JPG","error":"Not Found","statusCode":404}
I've check in the database and using spaces instead of %20
returns the rigth file:
select * from assets
where "originalPath" = '/data/photos/20080100 - 7 meses Judith/DSCN2108.JPG';
a3264825-dc47-4ccb-85d4-e857ab85cc7b,DSCN2108.JPG,97131972-710b-4fe4-b500-ba57dfa8af31,Library Import,IMAGE,/data/photos/20080100 - 7 meses Judith/DSCN2108.JPG,upload/thumbs/97131972-710b-4fe4-b500-ba57dfa8af31/a3/26/a3264825-dc47-4ccb-85d4-e857ab85cc7b-preview.jpeg,2008-01-01 13:08:22.000000 +00:00,2008-01-01 12:08:22.000000 +00:00,false,,upload/thumbs/97131972-710b-4fe4-b500-ba57dfa8af31/a3/26/a3264825-dc47-4ccb-85d4-e857ab85cc7b-thumbnail.webp,"",0x847293779E75D9CE3E9D6EB91AAEEC887487846E,true,,2024-05-17 15:11:09.479325 +00:00,2024-05-17 12:04:31.061676 +00:00,false,DSCN2108.JPG,,0x16180A0D00676780574687D677867898A3974F013A,false,dbdc1495-80cc-4432-9297-60938b41449b,true,,2008-01-01 13:08:22.000000 +00:00,
This is the execution log:
Processing folder: /home/ivanlm/qFotos/FotosTodas/20080100 - 7 meses Judith
Album 20080100 - 7 meses Judith does not exist
searching for: /data/photos/20080100 - 7 meses Judith/DSCN2108.JPG
Traceback (most recent call last):
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/bin/im", line 6, in <module>
sys.exit(cli())
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/ivanlm/TEMP/immich-albums/src/immich_albums/im.py", line 191, in cli
immich_albums.create_albums_from_folder(
File "/home/ivanlm/TEMP/immich-albums/src/immich_albums/im.py", line 152, in create_albums_from_folder
self.create_albums_from_folder(path, original_path, replace_path, True, dry_run,
File "/home/ivanlm/TEMP/immich-albums/src/immich_albums/im.py", line 148, in create_albums_from_folder
self.create_album_from_folder(path, original_path, replace_path, dry_run, skip_existing=skip_existing)
File "/home/ivanlm/TEMP/immich-albums/src/immich_albums/im.py", line 115, in create_album_from_folder
assets_ids = self.get_assets_in_folder(path, original_path, replace_path)
File "/home/ivanlm/TEMP/immich-albums/src/immich_albums/im.py", line 92, in get_assets_in_folder
asset_id = self.get_asset_by_original_path(replaced_path)
File "/home/ivanlm/TEMP/immich-albums/src/immich_albums/im.py", line 44, in get_asset_by_original_path
assets = api_instance.search_assets(original_path=original_path)
File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call
File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/openapi_client/api/asset_api.py", line 3806, in search_assets
return self.search_assets_with_http_info(checksum, city, country, created_after, created_before, device_asset_id, device_id, encoded_video_path, id, is_archived, is_encoded, is_external, is_favorite, is_motion, is_offline, is_read_only, is_visible, lens_model, library_id, make, model, order, original_file_name, original_path, page, resize_path, size, state, taken_after, taken_before, trashed_after, trashed_before, type, updated_after, updated_before, webp_path, with_deleted, with_exif, with_people, with_stacked, **kwargs) # noqa: E501
File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call
File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/openapi_client/api/asset_api.py", line 4158, in search_assets_with_http_info
return self.api_client.call_api(
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/openapi_client/api_client.py", line 409, in call_api
return self.__call_api(resource_path, method,
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/openapi_client/api_client.py", line 221, in __call_api
raise e
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/openapi_client/api_client.py", line 211, in __call_api
response_data = self.request(
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/openapi_client/api_client.py", line 435, in request
return self.rest_client.get_request(url,
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/openapi_client/rest.py", line 242, in get_request
return self.request("GET", url,
File "/home/ivanlm/.cache/pypoetry/virtualenvs/immich-albums-fF0xvNUT-py3.10/lib/python3.10/site-packages/openapi_client/rest.py", line 231, in request
raise NotFoundException(http_resp=r)
openapi_client.exceptions.NotFoundException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'X-Powered-By': 'Express', 'x-immich-cid': 'v31rkpqp', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '146', 'ETag': '"92-0Yq+GPlPhZr57TDlVkUTy3gHQcg"', 'Date': 'Fri, 17 May 2024 19:24:51 GMT', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=5'})
HTTP response body: {"message":"Cannot GET /api/assets?originalPath=/data/photos/20080100%20-%207%20meses%20Judith/DSCN2108.JPG","error":"Not Found","statusCode":404}
Thanks for your tool and support.
As a feature request, it would be great if this script didn't create albums for directories with no images or movies in it (i.e. create album only if there is something to put in the album)
What I have:
Description: Ubuntu 22.04.4 LTS
Poetry (version 1.2.0)
Python 3.10.12
I followed the installation instructions, but when entering the command:
im --help
I get im: command not found.
I can't update Poetry to a newer version, maybe that's the case? What is this im command? Thank you in advance
Hey. Immich dev here. Now with the new asset search API, you can simplify your code to not have to do db connections :)
Thanks for this great contribution, just what I was looking to create albums like with the (now obsolete) external library import.
I tried using the script but get this error. Is it possible it gets confused by my folder hierarchy, or something else ?
my folders are like this:
YYYY
|--YYYY-MM-AlbumTitle
|----IMG1.jpg
im --api-key v06xNULsbzUnhvTbwRftzuSxESZzLiLSSllehdtfhz --api-host immich.something.com --dry-run --replace-path /DATA/Gallery/Events/ --original-path /DATA/Gallery/Events/ --recursive /DATA/Gallery/Events/
Processing folder: /DATA/Gallery/Events/
Album does not exist
DRY RUN: Creating album
DRY RUN: Assets ids: []
Processing folder: /DATA/Gallery/Events/2007
Album 2007 does not exist
DRY RUN: Creating album 2007
DRY RUN: Assets ids: []
Processing folder: /DATA/Gallery/Events/2007/2007-09-Disneyland
Album 2007-09-Disneyland does not exist
searching for: /DATA/Gallery/Events/2007/2007-09-Disneyland/IMG_9517.jpg
Traceback (most recent call last):
File "pydantic/main.py", line 522, in pydantic.main.BaseModel.parse_obj
ValueError: dictionary update sequence element #0 has length 1; 2 is required
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/bin/im", line 6, in <module>
sys.exit(cli())
^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/immich-albums/src/immich_albums/im.py", line 192, in cli
immich_albums.create_albums_from_folder(
File "/root/immich-albums/src/immich_albums/im.py", line 154, in create_albums_from_folder
self.create_albums_from_folder(path, original_path, replace_path, True, dry_run,
File "/root/immich-albums/src/immich_albums/im.py", line 154, in create_albums_from_folder
self.create_albums_from_folder(path, original_path, replace_path, True, dry_run,
File "/root/immich-albums/src/immich_albums/im.py", line 150, in create_albums_from_folder
self.create_album_from_folder(path, original_path, replace_path, dry_run, skip_existing=skip_existing)
File "/root/immich-albums/src/immich_albums/im.py", line 116, in create_album_from_folder
assets_ids = self.get_assets_in_folder(path, original_path, replace_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/immich-albums/src/immich_albums/im.py", line 93, in get_assets_in_folder
asset_id = self.get_asset_by_original_path(replaced_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/immich-albums/src/immich_albums/im.py", line 45, in get_asset_by_original_path
assets = api_instance.search_assets(original_path=original_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call
File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/openapi_client/api/asset_api.py", line 3658, in search_assets
return self.search_assets_with_http_info(id, library_id, type, order, device_asset_id, device_id, checksum, is_archived, is_encoded, is_external, is_favorite, is_motion, is_offline, is_read_only, is_visible, with_deleted, with_stacked, with_exif, with_people, created_before, created_after, updated_before, updated_after, trashed_before, trashed_after, taken_before, taken_after, original_file_name, original_path, resize_path, webp_path, encoded_video_path, city, state, country, make, model, lens_model, page, size, **kwargs) # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call
File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/openapi_client/api/asset_api.py", line 4010, in search_assets_with_http_info
return self.api_client.call_api(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 409, in call_api
return self.__call_api(resource_path, method,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 247, in __call_api
return_data = self.deserialize(response_data, response_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 319, in deserialize
return self.__deserialize(data, response_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 335, in __deserialize
return [self.__deserialize(sub_data, sub_kls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 335, in <listcomp>
return [self.__deserialize(sub_data, sub_kls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 358, in __deserialize
return self.__deserialize_model(data, klass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 758, in __deserialize_model
return klass.from_dict(data)
^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/immich-albums-Lu1yoump-py3.11/lib/python3.11/site-packages/openapi_client/models/asset_response_dto.py", line 151, in from_dict
return AssetResponseDto.parse_obj(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pydantic/main.py", line 525, in pydantic.main.BaseModel.parse_obj
pydantic.error_wrappers.ValidationError: 1 validation error for AssetResponseDto
__root__
AssetResponseDto expected dict not str (type=type_error)
I have this config.yaml
:
---
api-key: 'hello'
api-host: 'http://127.0.0.1:2283/api'
original-path: '/tank/path'
replace-path: '/usr/src/app/external'
(also tried without ---
and quotes)
But I get:
$ im -r --dry-run --config config.yaml /tank/path
Loading config from: config.yaml
Usage: im [OPTIONS] PATH
Try 'im --help' for help.
Error: Missing option '--api-key'.
Probably missing something though.
This is a test with an empty directory, but on a real one it appeared to process even the parent multiple times
Processing folder: /tank/path/Folder
Album Folder does not exist
DRY RUN: Creating album Folder
DRY RUN: Assets ids: []
Processing folder: /tank/path/Folder/Subfolder
Album Subfolder does not exist
DRY RUN: Creating album Subfolder
DRY RUN: Assets ids: []
Processing folder: /tank/path/Folder/Subfolder
Album Subfolder does not exist
DRY RUN: Creating album Subfolder
DRY RUN: Assets ids: []
This might be because of the recursive call on https://github.com/alvistar/immich-albums/blob/main/src/immich_albums/im.py#L150-L154 (since os.walk
is already recursive).
I was hoping this still worked, being less than a month old, but it looks as if Immich has already killed it... or perhaps I'm not using the path
argument correctly... Any advice appreciated...
(immich-albums-py3.11) benland100@blandtoo ~/immich-albums $ im --api-key [REDACTED] --api-host [REDACTED] --original-path /mnt/raid/media/pictures --replace-path /usr/src/app/external /mnt/raid/media/pictures
/2023-10-02\ Kentuck\ Knob/
Processing folder: /mnt/raid/media/pictures/2023-10-02 Kentuck Knob
Album 2023-10-02 Kentuck Knob does not exist
searching for: /usr/src/app/external/2023-10-02 Kentuck Knob/DSC03455.JPG
Traceback (most recent call last):
File "pydantic/main.py", line 522, in pydantic.main.BaseModel.parse_obj
ValueError: dictionary update sequence element #0 has length 1; 2 is required
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/bin/im", line 6, in <module>
sys.exit(cli())
^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/immich-albums/src/immich_albums/im.py", line 192, in cli
immich_albums.create_albums_from_folder(
File "/home/benland100/immich-albums/src/immich_albums/im.py", line 158, in create_albums_from_folder
self.create_album_from_folder(path, original_path, replace_path, dry_run, skip_existing=skip_existing)
File "/home/benland100/immich-albums/src/immich_albums/im.py", line 115, in create_album_from_folder
assets_ids = self.get_assets_in_folder(path, original_path, replace_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/immich-albums/src/immich_albums/im.py", line 92, in get_assets_in_folder
asset_id = self.get_asset_by_original_path(replaced_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/immich-albums/src/immich_albums/im.py", line 44, in get_asset_by_original_path
assets = api_instance.search_assets(original_path=original_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call
File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/openapi_client/api/asset_api.py", line 3658, in search_assets
return self.search_assets_with_http_info(id, library_id, type, order, device_asset_id, device_id, checksum, is_archived, is_encoded, is_external, is_favorite, is_motion, is_offline, is_read_only, is_visible, with_deleted, with_stacked, with_exif, wit
h_people, created_before, created_after, updated_before, updated_after, trashed_before, trashed_after, taken_before, taken_after, original_file_name, original_path, resize_path, webp_path, encoded_video_path, city, state, country, make, model, lens_model
, page, size, **kwargs) # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^
File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call
File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/openapi_client/api/asset_api.py", line 4010, in search_assets_with_http_info
return self.api_client.call_api(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 409, in call_api
return self.__call_api(resource_path, method,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 247, in __call_api
return_data = self.deserialize(response_data, response_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 319, in deserialize
return self.__deserialize(data, response_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 335, in __deserialize
return [self.__deserialize(sub_data, sub_kls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 335, in <listcomp>
return [self.__deserialize(sub_data, sub_kls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 358, in __deserialize
return self.__deserialize_model(data, klass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/openapi_client/api_client.py", line 758, in __deserialize_model
return klass.from_dict(data)
^^^^^^^^^^^^^^^^^^^^^
File "/home/benland100/.cache/pypoetry/virtualenvs/immich-albums-4Dqx2L68-py3.11/lib/python3.11/site-packages/openapi_client/models/asset_response_dto.py", line 151, in from_dict
return AssetResponseDto.parse_obj(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pydantic/main.py", line 525, in pydantic.main.BaseModel.parse_obj
pydantic.error_wrappers.ValidationError: 1 validation error for AssetResponseDto
__root__
AssetResponseDto expected dict not str (type=type_error)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.