StarryPy / StarryPy3k

StarryPy on Python3k
Other
53 stars 35 forks source link

TypeError: unhashable type: 'Player' #118

Closed kharidiron closed 7 years ago

kharidiron commented 7 years ago

Latest commit 023393b breaks.

2017-09-12 10:14:43 - ERROR - starrypy # Error during server startup.
Traceback (most recent call last):
  File "server.py", line 205, in __init__
    self.plugin_manager.resolve_dependencies()
  File "/data/StarryPy3k/plugin_manager.py", line 128, in resolve_dependencies
    p = classes[name]()
  File "/data/StarryPy3k/plugins/player_manager.py", line 216, in __init__
    self.shelf = Cupboard(self.plugin_config.player_db)
  File "/data/StarryPy3k/utilities.py", line 248, in __init__
    self.dict[k] = Unpickler(v).load()
TypeError: unhashable type: 'Player'
2017-09-12 10:14:43 - WARNING - starrypy # Exiting
kharidiron commented 7 years ago

Looks like it is related to adding __eq__ to the Cupboard PlayerManger object.

https://stackoverflow.com/questions/1608842/types-that-define-eq-are-unhashable

kharidiron commented 7 years ago

Should be fixed with 6296802. Closing.