Icon Image ValueError difficult to interpret
See original GitHub issuePillow is raising a ValueError and Newspaper is printing it. It should instead be raised for the exception handler on images:153 so the user knows what’s happening (i.e. what url failed, etc…).
Traceback (most recent call last):
File "/var/virtualenvs/centr/lib/python3.5/site-packages/newspaper/images.py", line 121, in fetch_url
p.feed(new_data)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/PIL/ImageFile.py", line 377, in feed
im = Image.open(fp)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/PIL/Image.py", line 2299, in open
im = _open_core(fp, filename, prefix)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/PIL/Image.py", line 2289, in _open_core
im = factory(fp, filename)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/PIL/ImageFile.py", line 97, in __init__
self._open()
File "/var/virtualenvs/centr/lib/python3.5/site-packages/PIL/IcoImagePlugin.py", line 264, in _open
self.load()
File "/var/virtualenvs/centr/lib/python3.5/site-packages/PIL/IcoImagePlugin.py", line 267, in load
im = self.ico.getimage(self.size)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/PIL/IcoImagePlugin.py", line 150, in getimage
return self.frame(i)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/PIL/IcoImagePlugin.py", line 201, in frame
('L', 0, -1) # 8bpp inverted, unpadded, reversed
File "/var/virtualenvs/centr/lib/python3.5/site-packages/PIL/Image.py", line 2131, in frombuffer
core.map_buffer(data, size, decoder_name, None, 0, args)
ValueError: buffer is not large enough
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How can I open images in a Google Colaboratory notebook ...
In Google Colab, open the file browser icon (left nav bar) and navigate to ... 'image/gif' else: raise ValueError('Unknown extension: %s' ...
Read more >3 Ways to Add Images to Your Jupyter Notebook - Essi Alizadeh
Approach 1: Add an image from a local file. We can add images from your local drive by providing the path to the...
Read more >How to correct a #VALUE! error - Microsoft Support
In this case, try using a function instead. Functions will often ignore text values and calculate everything as numbers, eliminating the #VALUE! error....
Read more >Handling Missing Data in Pandas: NaN Values Explained
Handling Missing Data in Pandas: NaN Values Explained. December 23, 2020. 3 minute read. Walker Rowe. In applied data science, you will usually...
Read more >ValueError - Laur's blog - Laur IVAN
More: -ajax 12.1 2 2.1.7 2016 3 3d 400 404 418 530 56 7 8 aapt access accessort account actionbar activity ad7 adb...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello! I have another example URL where it still happens https://yandex.st/lego/_/Gkmfl8ZxooHEnbHJEo5KoZ0AVP0.ico
This is broken in 0.1.7 but is now fixed 😃
So, no worries.