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

error doing hps update #41

Open
ghost opened this issue Sep 10, 2023 · 2 comments
Open

error doing hps update #41

ghost opened this issue Sep 10, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 10, 2023

The photos folder contain iPhone images (I removed MOV files since these caused problems):

> hps update
[2023-09-10 18:06:06] - Skipping non-album directory: resources
[2023-09-10 18:06:06] - Skipping non-album directory: themes
[2023-09-10 18:06:06] - Skipping non-album directory: content
[2023-09-10 18:06:06] - Skipping non-album directory: archetypes
[2023-09-10 18:06:06] - Skipping non-album directory: static
[2023-09-10 18:06:06] - Skipping non-album directory: public
[2023-09-10 18:06:06] - Skipping non-album directory: git
[2023-09-10 18:06:06] - Skipping non-album directory: layouts
[2023-09-10 18:06:06] - Skipping non-album directory: data
Updating album: tOKvdGhp
[2023-09-10 18:06:07] - [2023-07-29_18-10-50.JPG] Scaling up image from (1119, 920) to (1600, 1315). Scaling up may not be desirable.
[2023-09-10 18:06:09] - [2023-08-23_16-53-16.JPG] Scaling up image from (1200, 824) to (1600, 1099). Scaling up may not be desirable.
[2023-09-10 18:06:09] - [2023-08-23_16-53-25.JPG] Scaling up image from (1200, 824) to (1600, 1099). Scaling up may not be desirable.
[2023-09-10 18:06:09] - [2023-08-23_17-05-53.JPG] Scaling up image from (1150, 751) to (1600, 1045). Scaling up may not be desirable.
[2023-09-10 18:06:09] - [2023-08-23_17-06-42.JPG] Scaling up image from (1170, 763) to (1600, 1043). Scaling up may not be desirable.
Traceback (most recent call last):
  File "/home/me/.local/bin/hps", line 8, in <module>
    sys.exit(main())
  File "/home/me/.local/lib/python3.10/site-packages/hugophotoswipe/__main__.py", line 13, in main
    sys.exit(realmain())
  File "/home/me/.local/lib/python3.10/site-packages/hugophotoswipe/ui.py", line 50, in main
    hps.update(name=album)
  File "/home/me/.local/lib/python3.10/site-packages/hugophotoswipe/hugophotoswipe.py", line 55, in update
    self.update_all() if name is None else self.update_single(name)
  File "/home/me/.local/lib/python3.10/site-packages/hugophotoswipe/hugophotoswipe.py", line 60, in update_all
    album.update()
  File "/home/me/.local/lib/python3.10/site-packages/hugophotoswipe/album.py", line 340, in update
    photo.create_sizes()
  File "/home/me/.local/lib/python3.10/site-packages/hugophotoswipe/photo.py", line 141, in create_sizes
    self.create_thumb(mode="thumb", pth=self.thumb_path)
  File "/home/me/.local/lib/python3.10/site-packages/hugophotoswipe/photo.py", line 177, in create_thumb
    return self.create_thumb_py(mode=mode, pth=pth)
  File "/home/me/.local/lib/python3.10/site-packages/hugophotoswipe/photo.py", line 209, in create_thumb_py
    ret = sc.crop(img, crop_width, crop_height)
  File "/home/me/.local/lib/python3.10/site-packages/smartcrop/library.py", line 158, in crop
    Image.Resampling.LANCZOS)
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 65, in __getattr__
    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
AttributeError: module 'PIL.Image' has no attribute 'Resampling'
@GjjvdBurg
Copy link
Owner

Thanks for reporting this issue, I believe this should be fixed in v0.3.1

@squaregoldfish
Copy link

squaregoldfish commented Dec 16, 2023

FYI: I was still seeing this with v0.3.1 on my Ubuntu 22.04 installation (which has Pillow 9.0.1). Setting up a separate pipenv for hugophotoswipe allowed it to download Pillow 10.1.0 and everything was fine.

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

2 participants