cyhex/smm — Issue #1: AttributeError: 'str' object has no attribute 'get'
Author: lestatega
Created: 2011-10-12 03:56:19+00:00
State: open

I have installed all the modules and run all the steps to work with the the SMM and when Im trying to run the client python program to connect to the server the server side dumps this error,

I'm currently stuck on this:

tracker # python moodClassifierd.py debug
starting debug mode...
OK
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 51861)
Traceback (most recent call last):
File "/usr/lib/python2.6/SocketServer.py", line 560, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.6/SocketServer.py", line 322, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.6/SocketServer.py", line 617, in __init__
self.handle()
File "moodClassifierd.py", line 60, in handle
raise e
AttributeError: 'str' object has no attribute 'get'
----------------------------------------

The moodClassifierd.py is throwing an exception on the line 60, do you guys know what it is happening?

try:

data_to_send = []
for r in recvData:
text = r.get('text')
r['x_lang'] = self.server.langCls.detect(text)[0]
r['x_mood'] = self.server.moodCls.classify(text,r['x_lang'] )
data_to_send.append(r)
except Exception,e:
raise e <------------------------------------------------------------HERE
return False

self._send(data_to_send)