Skip to content

set_cell_style with Python 3 #11

@francescomambrini

Description

@francescomambrini

There is a compatibility problem with Python 3.
Since dict.iteritems() was removed from Python 3 (one has to use dict.items() instead), calling set_cell_style will raise the following error:

itable.py in set_cell_style(self, style, rows, cols, format_function, **kwargs)
101 """
102 if style is None: style = CellStyle()
--> 103 for key, value in kwargs.iteritems():
104 k = key.replace("_", "-")
105 style.set(k, value)

AttributeError: 'dict' object has no attribute 'iteritems'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions