Skip to content

widget.py - TypeError: can't convert float to int #66

Closed
@caternuson

Description

@caternuson

Re this thread:
https://forums.adafruit.com/viewtopic.php?f=47&t=186239

Added a dump of the values just before this line:

if (self._anchor_point is not None) and (self._anchored_position is not None):

thusly:

print(self._anchored_position[0], self._anchor_point[0], self._bounding_box[2], self._bounding_box[0])

and get:

6.0 0.0 93 0

So some of the values are float making the result also float. displayio.Group.x requires int.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions