Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'LagartoMqttClient' object has no attribute 'publish_lock'. after update of debian9
12-14-2016, 12:13 AM
Post: #1
'LagartoMqttClient' object has no attribute 'publish_lock'. after update of debian9
terminal output:
Code:
Rved: (0931)000400D600040C02AD032D
Register addr= 4 id=12 changed to 02AD032D
response: 1 Temperature_4 in address 4 changed to 18.5 C
response: 2 Humidity_4 in address 4 changed to 81.3 %
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/swap/modem/SerialPort.py", line 74, in run
    self.serial_received(strBuf)
  File "/usr/local/lib/python2.7/dist-packages/swap/modem/SerialModem.py", line 77, in _serialPacketReceived
    self._ccpacket_received(ccPacket)
  File "/usr/local/lib/python2.7/dist-packages/swap/SwapServer.py", line 208, in _ccPacketReceived
    self._updateRegisterValue(swPacket)
  File "/usr/local/lib/python2.7/dist-packages/swap/SwapServer.py", line 368, in _updateRegisterValue
    self._eventHandler.registerValueChanged(reg)
  File "/usr/local/panstamp/python_tools/lagarto/lagarto-swap/swapmanager.py", line 160, in registerValueChanged
    self.publish_status(status)
  File "/usr/local/panstamp/python_tools/lagarto/lagarto/lagartocomms.py", line 111, in publish_status
    self.mqtt_client.publish_status(status_data, endp)
  File "/usr/local/panstamp/python_tools/lagarto/lagarto/lagartomqtt.py", line 85, in publish_status
    self.publish_lock.acquire()
AttributeError: 'LagartoMqttClient' object has no attribute 'publish_lock'

PROVISIONAL SOLUTION: disconnect MQTT server commenting the lines in swapmanager.py:
Code:
        #~ if len(status) > 0:
        #~ self.publish_status(status)

As it has occurred after a debian 9 update (stretch, testing) I think it can be a package incopatibility issue

Melchor Monleón
http://seniarq.es
http://climatiza.me
Find all posts by this user
Quote this message in a reply
12-14-2016, 06:12 PM
Post: #2
RE: 'LagartoMqttClient' object has no attribute 'publish_lock'. after update
Hi Melchor.

This is weird but I suggest you to upgrade to the latest release of Python Tools in any case.

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)