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

TST: open image file in binary mode #3460

Merged
merged 1 commit into from
Mar 17, 2014
Merged

TST: open image file in binary mode #3460

merged 1 commit into from
Mar 17, 2014

Conversation

cgohlke
Copy link
Contributor

@cgohlke cgohlke commented Mar 17, 2014

Fix test error on Windows:

======================================================================
ERROR: test_io.test_imread
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python34\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "X:\Python34\lib\site-packages\numpy\testing\decorators.py", line 146, in skipper_func
    return f(*args, **kwargs)
  File "X:\Python34\lib\site-packages\scipy\ndimage\tests\test_io.py", line 26, in test_imread
    img = ndi.imread(fobj, mode="RGB")
  File "X:\Python34\lib\site-packages\scipy\ndimage\io.py", line 43, in imread
    im = Image.open(fname)
  File "X:\Python34\lib\site-packages\PIL\Image.py", line 1997, in open
    prefix = fp.read(16)
  File "X:\Python34\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 84: character maps to <undefined>

@rgommers rgommers added this to the 0.14.0 milestone Mar 17, 2014
rgommers added a commit that referenced this pull request Mar 17, 2014
TST: open image file in binary mode
@rgommers rgommers merged commit 6b0b9b2 into scipy:master Mar 17, 2014
@rgommers
Copy link
Member

Thanks Christoph.

@rgommers
Copy link
Member

backported to 0.14.x in 5cfc0b9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.ndimage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants