Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 38fee26

Browse files
committed
Merge pull request matplotlib#5071 from cgohlke/patch-2
FIX: URLError: <urlopen error unknown url type: c> on Windows
2 parents a8600d8 + fe8b3b9 commit 38fee26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ def pilread(fname):
13161316
if cbook.is_string_like(fname):
13171317
parsed = urlparse(fname)
13181318
# If fname is a URL, download the data
1319-
if parsed.scheme != '':
1319+
if len(parsed.scheme) > 1:
13201320
fd = BytesIO(urlopen(fname).read())
13211321
return handler(fd)
13221322
else:

0 commit comments

Comments
 (0)