Skip to content

TypeError: '<' not supported between instances of 'Cell' and 'Cell' #5

Closed
@adnanobot

Description

@adnanobot

Hi,

when I provide input like the following,
coordinates = [[[100, 0], [101, 0], [110, 10], [100, 1], [100, 0]]]

Then it's ok and I am getting the output, Centroid: [101.25, 1.25]

But if I just change the second coordinate,
coordinates = [[[100, 0], [105, 0], [110, 10], [100, 1], [100, 0]]]

then I get the following error:
Traceback (most recent call last): File "curve2poly.py", line 75, in <module> centroid = polylabel(x) File "C:\Users\mahmad\vision\lib\site-packages\polylabel\__init__.py", line 138, in polylabel _, __, cell = cell_queue.get() File "C:\Program Files\Python37\lib\queue.py", line 180, in get item = self._get() File "C:\Program Files\Python37\lib\queue.py", line 236, in _get return heappop(self.queue) TypeError: '<' not supported between instances of 'Cell' and 'Cell'

I am not getting what kind of input polylabel() takes? It should work with any shape and size of polygons, right?

Update: It is working fine in ubuntu but not in windows.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions