خرید بک لینک

Vote count: 0

I am trying to pass a python dictionary to a rabbitmq queue via pika, this is probably a python problem and not rabbitmq itself. I am getting an error as stated above and here is my code:

def PingAddScan(deviceID, ipAddress, deviceHistory, item, date, apiURL, browserConId):
    if PingDevice(deviceID, ipAddress):
        BasicScan(ipAddress, deviceID, item, apiURL)
        deviceHistory[deviceID] = date

        # After the basic scan we are going to need to push a message back to the user to say
        # that the pathfinder has successfully found the device, and it should prompt the user
        # what he wants to scan
        print browserConId + " : " + deviceID
        chaelOutbound.queue_declare(queue='outboundMessaging', durable=True)
        message = {"browserCoectionID": browserConId, "data": "FOUND", "deviceID": deviceID}
        print str(message)
        chaelOutbound.basic_publish(exchange='messaging',
                              routing_key='outbound',
                              body=message)

and here is the full stack trace:

    Traceback (most recent call last):
  File "pathfinderAllocator.py", line 454, in <module>
    chael.start_consuming()
  File "/usr/local/lib/python2.7/site-packages/pika/adapters/blocking_coection.py", line 1755, in start_consuming
    self.coection.process_data_events(time_limit=None)
  File "/usr/local/lib/python2.7/site-packages/pika/adapters/blocking_coection.py", line 715, in process_data_events
    self._dispatch_chael_events()
  File "/usr/local/lib/python2.7/site-packages/pika/adapters/blocking_coection.py", line 518, in _dispatch_chael_events
    impl_chael._get_cookie()._dispatch_events()
  File "/usr/local/lib/python2.7/site-packages/pika/adapters/blocking_coection.py", line 1384, in _dispatch_events
    evt.body)
  File "pathfinderAllocator.py", line 439, in callback
    PingAddScan(deviceID, ipAddress, deviceHistory, new_device, date, data, browser_coectionid)
  File "pathfinderAllocator.py", line 337, in PingAddScan
    body=message)
  File "/usr/local/lib/python2.7/site-packages/pika/adapters/blocking_coection.py", line 2052, in basic_publish
    mandatory, immediate)
  File "/usr/local/lib/python2.7/site-packages/pika/adapters/blocking_coection.py", line 2138, in publish
    immediate=immediate)
  File "/usr/local/lib/python2.7/site-packages/pika/chael.py", line 421, in basic_publish
    (properties, body))
  File "/usr/local/lib/python2.7/site-packages/pika/chael.py", line 1324, in _send_method
    self.coection._send_method(self.chael_number, method, content)
  File "/usr/local/lib/python2.7/site-packages/pika/coection.py", line 2137, in _send_method
    self._send_message(chael_number, method, content)
  File "/usr/local/lib/python2.7/site-packages/pika/coection.py", line 2164, in _send_message
    content[1][start:end]).marshal())
TypeError: unhashable type

asked 46 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 4 تير 1395 ساعت: 19:12

صفحه بندی