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

__new__() got an unexpected keyword argument 'load' #13

Open
alevchuk opened this issue Jun 7, 2021 · 0 comments
Open

__new__() got an unexpected keyword argument 'load' #13

alevchuk opened this issue Jun 7, 2021 · 0 comments

Comments

@alevchuk
Copy link

alevchuk commented Jun 7, 2021

Any tips on how to work around this?

$ pip install -U greedypacker

Collecting greedypacker
  Downloading greedypacker-0.4.tar.gz (17 kB)
Collecting sortedcontainers
  Downloading sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Building wheels for collected packages: greedypacker
  Building wheel for greedypacker (setup.py) ... done
  Created wheel for greedypacker: filename=greedypacker-0.4-py3-none-any.whl size=14445 sha256=87dcff3680492c11322f18df0ec34b5fa249307eadd7e5b1b3fd71a81a625f9e
  Stored in directory: /home/aleksandr/.cache/pip/wheels/5f/19/41/1cb0522b53e10bf6cd9ba35bcacd8ca05559c73e56c48b70ea
Successfully built greedypacker
Installing collected packages: sortedcontainers, greedypacker
Successfully installed greedypacker-0.4 sortedcontainers-2.4.0


$ python3
Python 3.9.5 (default, May 14 2021, 00:00:00) 
[GCC 11.1.1 20210428 (Red Hat 11.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import greedypacker
>>> M = greedypacker.BinManager(8, 4, pack_algo='shelf', heuristic='best_width_fit', wastemap=True, rotation=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/aleksandr/knapsack-virtualenv/lib/python3.9/site-packages/greedypacker/binmanager.py", line 58, in __init__
    defaultBin = self._bin_factory() 
  File "/home/aleksandr/knapsack-virtualenv/lib/python3.9/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 "/home/aleksandr/knapsack-virtualenv/lib/python3.9/site-packages/greedypacker/shelf.py", line 68, in __init__
    self.wastemap = guillotine.Guillotine(0, 0, rotation = self.rotation, heuristic='best_area')
  File "/home/aleksandr/knapsack-virtualenv/lib/python3.9/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'
>>> M = greedypacker.BinManager(8, 4, pack_algo='shelf', heuristic='best_width_fit', wastemap=True, rotation=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/aleksandr/knapsack-virtualenv/lib/python3.9/site-packages/greedypacker/binmanager.py", line 58, in __init__
    defaultBin = self._bin_factory() 
  File "/home/aleksandr/knapsack-virtualenv/lib/python3.9/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 "/home/aleksandr/knapsack-virtualenv/lib/python3.9/site-packages/greedypacker/shelf.py", line 68, in __init__
    self.wastemap = guillotine.Guillotine(0, 0, rotation = self.rotation, heuristic='best_area')
  File "/home/aleksandr/knapsack-virtualenv/lib/python3.9/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'
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

1 participant