Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#14330 closed (fixed)

Test failure with get_image_dimensions since [13715]

Reported by: gabrielhurley Owned by: gabrielhurley
Component: File uploads/storage Version: master
Severity: Keywords: get_image_dimensions PIL mode
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

On my windows xp machine (not on my mac os x box) the file_storage.InconsistentGetImageDimensionsBug fails because PIL is unable to read the data from the already-open ImageFile. The problem is that in the test case the ImageFile is created by calling open() on the file path without an explicit mode. This defaults to mode 'r', and PIL on Windows seems to only parse the data from the ImageFile if the mode is 'rb'.

I've attached a tiny patch that adds the mode flag to the test case, but when dealing with images the mode flag really ought to always be 'rb', right? Maybe there ought to be a larger fix here...

Attachments (1)

image_storage_read_binary.diff (712 bytes) - added by gabrielhurley 4 years ago.
sets the mode flag to 'rb' for the InconsistentGetImageDimensions test case.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by gabrielhurley

sets the mode flag to 'rb' for the InconsistentGetImageDimensions test case.

comment:1 Changed 4 years ago by gabrielhurley

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to gabrielhurley
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 4 years ago by Alex

  • Triage Stage changed from Unreviewed to Ready for checkin

comment:3 Changed 4 years ago by Alex

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed by [14001].

comment:4 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top