Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

pip package is broken #6

Open
PadLex opened this issue May 10, 2020 · 4 comments
Open

pip package is broken #6

PadLex opened this issue May 10, 2020 · 4 comments

Comments

@PadLex
Copy link

PadLex commented May 10, 2020

How to reproduce:
pip install greedypacker

import greedypacker
packer = greedypacker.BinManager(canvas[0], canvas[1],
                                     pack_algo='shelf', heuristic='best_width_fit', wastemap=True, rotation=True)
Traceback (most recent call last):
  File "C:/Users/---/PycharmProjects/---/test.py", line 9, in pack_test
    pack_algo='shelf', heuristic='best_width_fit', wastemap=True, rotation=True)
  File "C:\Users\---\PycharmProjects\---\venv\lib\site-packages\greedypacker\binmanager.py", line 58, in __init__
    defaultBin = self._bin_factory() 
  File "C:\Users\---\PycharmProjects\---\venv\lib\site-packages\greedypacker\binmanager.py", line 131, in _bin_factory
    return shelf.Sheet(self.bin_width, self.bin_height, self.rotation, self.wastemap, self.heuristic)
  File "C:\Users\---\PycharmProjects\---\venv\lib\site-packages\greedypacker\shelf.py", line 68, in __init__
    self.wastemap = guillotine.Guillotine(0, 0, rotation = self.rotation, heuristic='best_area')
  File "C:\Users\---\PycharmProjects\---\venv\lib\site-packages\greedypacker\guillotine.py", line 56, in __init__
    self.freerects = SortedListWithKey(iterable=None, key=lambda x: x.area, load=1000)
TypeError: __new__() got an unexpected keyword argument 'load

Using the source code from this repo I encountered no such errors and all tests ran successfully. As such, fixing this should be as simple as to update the pypi package.

@solomon-b
Copy link
Owner

solomon-b commented May 11, 2020

Oops! I haven't been maintaining this project actively for a long time now and I think the last time I did work here on the repo I did not deploy the version bump on PyPi.

I will make a point of redeploying to PyPi this week.

@PadLex
Copy link
Author

PadLex commented May 18, 2020

Great, thank you for your time!

@needleworm
Copy link

 54         if x == 0 or y == 0:
 55             #self.freerects = [] # type: List[FreeRectangle]

---> 56 self.freerects = SortedListWithKey(iterable=None, key=lambda x: x.area, load=1000)
57 else:
58 self.freerects = SortedListWithKey([FreeRectangle(self.x, self.y, 0, 0)], key=lambda x: x.area, load=1000)

TypeError: new() got an unexpected keyword argument 'load'

In [3]:

This error is still happening. I installed this package today via pip version 21.

@AliRafieePour
Copy link

 54         if x == 0 or y == 0:
 55             #self.freerects = [] # type: List[FreeRectangle]

---> 56 self.freerects = SortedListWithKey(iterable=None, key=lambda x: x.area, load=1000)
57 else:
58 self.freerects = SortedListWithKey([FreeRectangle(self.x, self.y, 0, 0)], key=lambda x: x.area, load=1000)

TypeError: new() got an unexpected keyword argument 'load'

In [3]:

This error is still happening. I installed this package today via pip version 21.

I'm facing the same issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants