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: https://github.com/Marcel-Kro/catalogue-003 #4

Open
mrchristian opened this issue Apr 17, 2023 · 2 comments
Open

error: https://github.com/Marcel-Kro/catalogue-003 #4

mrchristian opened this issue Apr 17, 2023 · 2 comments
Labels

Comments

@mrchristian
Copy link
Contributor

mrchristian commented Apr 17, 2023

Hi @Marcel-Kro can you add some detail about the error you have below. Let me know if the error was Quarto, running Notebooks, or something else.

@Marcel-Kro
Copy link
Collaborator

It's the paintings.ipynb notebook that's not working properly. I dont remember the exact error message, but i think it was the missing SPARQLWrapper library. At this point of time i had no output and only the error message. I've installed the libraries and that fixed the issue i've shown on friday.
Now there is another issue: it seems that running the notebook now gives me some output up until the point of the first image. I've committed this version and its viewable on my github pages under 'Activity: Paintings catalogue in Jupyter Notebook' or in the paintings.ipynb.
Running the notebook i get the following output:

Wikidata link: http://www.wikidata.org/entity/Q17276254

Title: Flowers in a Glass Flask

Year: 1612

Creator: Jacob de Gheyn II

Copyright: public domain


AttributeError Traceback (most recent call last)
in
90 headers = {'User-Agent': 'Ex_Books_conference_bot/0.0 (https://github.com/SimonXIX/Experimental_Books_workshop; [email protected])'}
91 im = get_image(image_url, headers)
---> 92 im.thumbnail((500, 500), Image.Resampling.LANCZOS)
93 display(im)
94 print('\n\n')

d:\Marcel\HS-Hannover\BIM\Anaconda\lib\site-packages\PIL\Image.py in getattr(name)
70 )
71 return categories[name]
---> 72 raise AttributeError(f"module '{name}' has no attribute '{name}'")
73
74

AttributeError: module 'PIL.Image' has no attribute 'Resampling'

@SimonXIX
Copy link
Collaborator

Hi Marcel, this is an issue with versions of Pillow older than 9.4.0. You can either run:

pip install Pillow==9.4.0

or more simply just remove the line im.thumbnail((500, 500), Image.Resampling.LANCZOS) from paintings.ipynb. All that does is resize the images so may not be necessary.

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

No branches or pull requests

3 participants