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

OS Error: cannot open resource (ImageFont.py) when trying to run ScrapeAdvisor.py #2

Open
aliss77777 opened this issue Feb 1, 2020 · 0 comments

Comments

@aliss77777
Copy link

Hi!

cool library, i'm trying to get it up and running. I've gone step-by-step through the tutorial and running into an issue the following issue when running the ScrapeAdvisor.py file:

Traceback (most recent call last):
File "ScrapeAdvisor.py", line 358, in
ScrapeAdvisor().run()
File "/usr/local/lib/python3.7/site-packages/kivy/app.py", line 829, in run
root = self.build()
File "ScrapeAdvisor.py", line 353, in build
return Test()
File "ScrapeAdvisor.py", line 111, in init
self.carousel = CarouselApp().build()
File "/Users/alexander.liss/Documents/scrapeadvisor/CarouselClass.py", line 37, in build
output_parser.to_image()
File "/Users/alexander.liss/Documents/scrapeadvisor/OutputParser.py", line 272, in to_image
font = ImageFont.truetype("C:\Windows\Fonts\Verdana.ttf", 30)
File "/usr/local/lib/python3.7/site-packages/PIL/ImageFont.py", line 546, in truetype
return freetype(font)
File "/usr/local/lib/python3.7/site-packages/PIL/ImageFont.py", line 543, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/usr/local/lib/python3.7/site-packages/PIL/ImageFont.py", line 161, in init
font, size, index, encoding, layout_engine=layout_engine
OSError: cannot open resource

I tried googling that error, seems like it that past that patch had been apply to PIL/ImageFont.py (https://github.com/python-pillow/Pillow/pull/3785/files), however i checked ImageFont.py and i'm already running the code that includes that patch.

config:
Mac OS High Sierra
Conda virtual environment

thanks!

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