Podshot / MCEdit-Unified

Combined MCEdit & Pymclevel repository.
http://podshot.github.io/MCEdit-Unified/
ISC License
483 stars 109 forks source link

TypeError when selecting player tool #247

Closed codewarrior0 closed 9 years ago

codewarrior0 commented 9 years ago

Selecting the player tool produces this error on both 1.2.4.0 and master.

[   ERROR][                    root.py:50]:Exception:
Traceback (most recent call last):
  File "c:\Users\Rio\Documents\src\MCEdit-Unified\mceutils.py", line 44, in _alertException
    return func(*args, **kw)
  File "c:\Users\Rio\Documents\src\MCEdit-Unified\editortools\player.py", line 718, in toolSelected
    self.showPanel()
  File "c:\Users\Rio\Documents\src\MCEdit-Unified\editortools\player.py", line 582, in showPanel
    self.panel = PlayerPositionPanel(self)
  File "c:\Users\Rio\Documents\src\MCEdit-Unified\editortools\player.py", line 372, in __init__
    self.player_UUID[version_utils.playercache.getPlayerFromUUID(player)] = player
TypeError: unhashable type: 'dict'

Error does not occur after removing my player file from playerdata/

Podshot commented 9 years ago

Can you send us your usercache.json? If you're running in portable mode, it should be one directory above the executable. If you're in Fixed mode, it should be in a MCEdit folder in your documents

codewarrior0 commented 9 years ago
[
  {
    "Playername": {
      "name": "codewarrior"
    },
    "Timstamp": 1420048124.866,
    "WasSuccessful": true,
    "UUID (No Separator)": "a1f04ccde5354a34ae5fb05084e5888f",
    "UUID (Separator)": "a1f04ccd-e535-4a34-ae5f-b05084e5888f"
  }
]

UUID matches the file under playerdata/

Podshot commented 9 years ago

Can you delete the usercache.json and relaunch? The cache seems to have merged the response into the cache file.

codewarrior0 commented 9 years ago

New error after removing usercache.json:

[   ERROR][                    root.py:50]:Exception:
Traceback (most recent call last):
  File "c:\Users\Rio\Documents\src\MCEdit-Unified\mceutils.py", line 44, in _alertException
    return func(*args, **kw)
  File "c:\Users\Rio\Documents\src\MCEdit-Unified\editortools\player.py", line 718, in toolSelected
    self.showPanel()
  File "c:\Users\Rio\Documents\src\MCEdit-Unified\editortools\player.py", line 582, in showPanel
    self.panel = PlayerPositionPanel(self)
  File "c:\Users\Rio\Documents\src\MCEdit-Unified\editortools\player.py", line 376, in __init__
    players = sorted(self.player_UUID.keys(), key=lambda x: False if x == "Player" else x.lower())
  File "c:\Users\Rio\Documents\src\MCEdit-Unified\editortools\player.py", line 376, in <lambda>
    players = sorted(self.player_UUID.keys(), key=lambda x: False if x == "Player" else x.lower())
AttributeError: 'NoneType' object has no attribute 'lower'

New usercache.json:

[
  {
    "Playername": "codewarrior",
    "Timstamp": 1420050974.636,
    "WasSuccessful": true,
    "UUID (No Separator)": "a1f04ccde5354a34ae5fb05084e5888f",
    "UUID (Separator)": "a1f04ccd-e535-4a34-ae5f-b05084e5888f"
  }
]

No errors after second relaunch. Removing the usercache again and relaunching produces the above error again.