cygwin环境下的MQTT连接问题

时间:2016-04-05 10:58:28

标签: python-2.7

我在cygwin环境中安装了mqtt python客户端(PAHO)。我在我的主板上运行了mqtt经纪人。我正在尝试连接到本地代理(127.0.0.1),但它给了我以下错误:

Exception in thread Thread-1:
  Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
      self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/site-packages/paho/mqtt/client.py", line 2287, in _thread_main
    self.loop_forever()
  File "/usr/lib/python2.7/site-packages/paho/mqtt/client.py", line 1290, in loop_forever
    self.reconnect()
  File "/usr/lib/python2.7/site-packages/paho/mqtt/client.py", line 688, in reconnect
    raise ValueError('Invalid host.')
ValueError: Invalid host.

Traceback (most recent call last):
  File "TestSuite_Main.py", line 146, in <module>
    STObj.IOhandler()
  File "TestSuite_Main.py", line 47, in IOhandler

注意:我的相同代码适用于linux。请帮忙。

0 个答案:

没有答案