rbavishi / Habitican-Curse

A Terminal application for HabitRPG using the python curses library
MIT License
31 stars 2 forks source link

habitica.py crashes with KeyError: 'specialClass' not in gearStats #2

Closed kbavishi closed 8 years ago

kbavishi commented 8 years ago

Here's the backtrace:

karanbavishi:Habitican-Curse karan$ python habitica.py
Traceback (most recent call last):
  File "habitica.py", line 53, in <module>
    curses.wrapper(main)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "habitica.py", line 50, in main
    G.intf.Input()
  File "/Users/karan/Habitican-Curse/interface.py", line 278, in Input
    self.Command(command)
  File "/Users/karan/Habitican-Curse/interface.py", line 240, in Command
    CT.GetData()
  File "/Users/karan/Habitican-Curse/content.py", line 149, in GetData
    userStats = H.GetUserStats(data)
  File "/Users/karan/Habitican-Curse/helper.py", line 265, in GetUserStats
    (gearStats['klass'] == "special" and gearStats['specialClass'] == userClass)):
KeyError: 'specialClass'
rbavishi commented 8 years ago

It has been fixed in the "Fixed special equipment error" commit. Pull the latest code