Export to GitHub

gilmud - issue #5

Investigating this issue


Posted on Jun 21, 2012 by Happy Dog

Unsure of how to reproduce. I believe it to be a flaw with disambiguation.

The following input caused the error

> get helm You pick up helmet > wear helm You have equiped the following item: helmet get sw

Exception in thread Thread-3: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 504, in run self.__target(*self.__args, **self.__kwargs) File "gilmud.py", line 216, in handlePlayer possibleCommand[1](player, target) File "/home/justin/gilmud/action.py", line 98, in equip room.broadcast(actor.name+" equips an item.", None, actor) File "/home/justin/gilmud/thing.py", line 59, in broadcast thing.hear(msg, color) File "/home/justin/gilmud/thing.py", line 265, in hear self.conn.send(msgcolor+msg+color.reset+endline) TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Comment #1

Posted on Jun 21, 2012 by Happy Dog

Wow... ok, so the following input then cause the same error. I was however able to type 'get sw' with no error.

get sw You pick up sword wear sw You have equiped the following item: sword eq

Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 504, in run self.__target(*self.__args, **self.__kwargs) File "gilmud.py", line 216, in handlePlayer possibleCommand[1](player, target) File "/home/justin/gilmud/action.py", line 98, in equip room.broadcast(actor.name+" equips an item.", None, actor) File "/home/justin/gilmud/thing.py", line 59, in broadcast thing.hear(msg, color) File "/home/justin/gilmud/thing.py", line 265, in hear self.conn.send(msgcolor+msg+color.reset+endline) TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Comment #2

Posted on Jun 21, 2012 by Happy Dog

Problem was with passing None into colors. :P

Status: Fixed

Labels:
Type-Defect Priority-Medium