samfoo/noobhack — Issue #17: Error in shop identification causes crash
Author: CJBrew
Created: 2011-12-05 21:50:48+00:00
State: open

Hi, I've just found a little problem during item identification in a shop.

If an item goes into inventory slot "A" when I pick it up, when I push the Identify button I get a crash.
I've tested a couple of other items by adjusting in the inventory, and it seems it's specifically the knapsack position "A" that causes this problem. The following trace info is given at the command prompt:

Traceback (most recent call last):
File "/usr/local/bin/noobhack", line 322, in
curses.wrapper(hack.run)
File "/usr/lib/python2.6/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/bin/noobhack", line 315, in run
self._game(window)
File "/usr/local/bin/noobhack", line 285, in _game
self.helper.redraw(window, self.options.crumbs)
File "/usr/local/lib/python2.6/dist-packages/noobhack/ui/helper.py", line 262, in redraw
if self._things_to_buy_identify() is not None:
File "/usr/local/lib/python2.6/dist-packages/noobhack/ui/helper.py", line 196, in _things_to_buy_identify
count = int(count)
ValueError: invalid literal for int() with base 10: 'A'