Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'stackCount' #14

Closed
jurviz opened this issue Feb 11, 2025 · 3 comments
Closed

KeyError: 'stackCount' #14

jurviz opened this issue Feb 11, 2025 · 3 comments

Comments

@jurviz
Copy link

jurviz commented Feb 11, 2025

When i run the script immich-auto-stack.py from the shell of the docker container i get the following exception:

`

2025-02-11 18:09:47,751 - INFO - ============== INITIALIZING ==============
2025-02-11 18:09:47,759 - INFO - ⬇️ Fetching assets:
2025-02-11 18:09:47,762 - INFO - Page size: 1000
2025-02-11 18:09:52,486 - INFO - Pages: None
2025-02-11 18:09:52,486 - INFO - Assets: 6846
Traceback (most recent call last):
File "/script/./immich_auto_stack.py", line 251, in
main()
File "/script/./immich_auto_stack.py", line 225, in main
children_id = [x['id'] for x in stack[1:] if x['stackCount'] == None ]
~^^^^^^^^^^^^^^
KeyError: 'stackCount'
`

The container is running with immich (version 1.126.1) in a docker compose stack.

@jurviz
Copy link
Author

jurviz commented Feb 11, 2025

This is log output of stack[0] at time of exception:
2025-02-11 18:36:06,115 - INFO - {'id': '5f7f061e-6f16-46f9-a7ac-6b738cfb5450', 'deviceAssetId': '1000002790', 'ownerId': '5da9ceba-c6ac-4eb4-a145-e224eee69e54', 'deviceId': '73598499202acd06db07700a459cf15c4bc48c33b712fd394999e9826eb57c5d', 'libraryId': None, 'type': 'IMAGE', 'originalPath': 'upload/library/admin/2023/2023-12-09/PXL_20231209_052735095.MP.jpg', 'originalFileName': 'PXL_20231209_052735095.MP.jpg', 'originalMimeType': 'image/jpeg', 'thumbhash': 'IggKDQAnhW9pSKeId4V5d6BpB26W', 'fileCreatedAt': '2023-12-09T05:27:35.095Z', 'fileModifiedAt': '2023-12-09T05:27:38.000Z', 'localDateTime': '2023-12-09T16:27:35.095Z', 'updatedAt': '2024-06-26T11:49:34.859Z', 'isFavorite': False, 'isArchived': False, 'isTrashed': False, 'duration': '0:00:00.00000', 'livePhotoVideoId': None, 'people': [], 'checksum': '74AUkzk56PdhkFNX92F1FlYdeY4=', 'isOffline': False, 'hasMetadata': True, 'duplicateId': None, 'resized': True}

@jurviz
Copy link
Author

jurviz commented Feb 11, 2025

local fix:
if skip_previous: children_id = [x['id'] for x in stack[1:] if x.get('stackCount', None) == None ]

Sorry, can't get it properly formatted. It is cut&paste from vi in shell.

@jurviz jurviz closed this as completed Feb 12, 2025
@jurviz
Copy link
Author

jurviz commented Feb 12, 2025

I'm currently testing with branch of Majorfi. No fix needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant