scrapeadvisor icon indicating copy to clipboard operation
scrapeadvisor copied to clipboard

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

Open aliss77777 opened this issue 5 years ago • 0 comments

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!

aliss77777 avatar Feb 01 '20 16:02 aliss77777