Skip to content

OFS.Image.File.__str__ broken under Python 3 when data is a Pdata object #711

@dataflake

Description

@dataflake

The __str__ implementation in OFS.Image.File is broken - Pdata objects do not have a decode method. It only works for files that are small enough so their data gets stored as a string value.

The issue exists on both master and the 4.x branch.

Zope/src/OFS/Image.py

Lines 665 to 666 in 5962a30

def __str__(self):
return self.data.decode(self._get_encoding())

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions