Salvoxia / immich-folder-album-creator

Automatically create and populate albums in Immich from a folder structure in external libraries
https://hub.docker.com/r/salvoxia/immich-folder-album-creator
222 stars 13 forks source link

EOFError: EOF when reading a line #32

Closed pin147 closed 3 months ago

pin147 commented 3 months ago

Hello

When I try to run manually immich_auto_album.sh I get the following error.

Using it with unRaid 7 Docker version 27.0.3

/script # ./immich_auto_album.sh 
time=2024-08-09T16:13:27.213+02:00 level=INFO msg=Detected Immich server version 1.111.0
time=2024-08-09T16:13:27.214+02:00 level=INFO msg=Requesting all assets
time=2024-08-09T16:13:27.471+02:00 level=INFO msg=2037 photos found
time=2024-08-09T16:13:27.471+02:00 level=INFO msg=Sorting assets to corresponding albums using folder name
time=2024-08-09T16:13:27.477+02:00 level=INFO msg=6 albums identified
time=2024-08-09T16:13:27.477+02:00 level=INFO msg=Album list: ['albums Lufthavn', 'albums SS SF', 'albums google_photos', 'albums esbjerg', 'events 2023 07-07-zoo-givskud', 'events 2023 07-11-fredericia']
Press enter to create these albums, Ctrl+C to abort
Traceback (most recent call last):
  File "/script/./immich_auto_album.py", line 416, in <module>
    input()
EOFError: EOF when reading a line
Salvoxia commented 3 months ago

Hi,

that's expected when running the container without the UNATTENDED Env Variable set. The rationale is to give the user the list of albums the script would create (dry run) so they can check whether that is what they actually want. Because direct user interaction is not possible when running the script from outside the container, it will simply stop. Please check this README section on that behavior.

TL;DR: Run the script while passing -e UNATTENDED=1.

Best Regards, Salvoxia

pin147 commented 3 months ago

Right, that makes sense. Maybe some text over there so the user knows what's happening instead of receiving that error for a feature version?

Anyway, amazing work! Everything works impeccably.

Salvoxia commented 3 months ago

Maybe some text over there so the user knows what's happening instead of receiving that error for a feature version?

Sounds like a good idea, implemented with 6638166e05b20cd76b34c33ad87e7cb2698b504e