求助小爱同学&树莓派控制电脑开机报错-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1330|回复: 4

[过期] 求助小爱同学&树莓派控制电脑开机报错

[复制链接]
发表于 2021-10-1 21:51 | 显示全部楼层 |阅读模式
root@raspberrypi:/opt# python3 p.py
[21:49:10 2021] url: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=4850f4648643&miType=outlet
[21:49:10 2021] Device Auth Data: {'detail': {'broker': 'blinker', 'deviceName': 'E452B9DAIS9M8OL98BS414LK', 'host': 'mqtts://broker.diandeng.tech', 'iotId': '7ScKMZn8qCrTR4eGBCtBt6ooF4', 'iotToken': 'QykAMBvY4gaCm3Red6AKAURQGqtcmnJE', 'port': '1884', 'productKey': 'blinker', 'uuid': 'fc2be11d22af11ec8df55254'}, 'message': 1000}
[21:49:10 2021] deviceName: E452B9DAIS9M8OL98BS414LK
[21:49:10 2021] iotId: 7ScKMZn8qCrTR4eGBCtBt6ooF4
[21:49:10 2021] iotToken: QykAMBvY4gaCm3Red6AKAURQGqtcmnJE
[21:49:10 2021] productKey: blinker
[21:49:10 2021] uuid: fc2be11d22af11ec8df55254
[21:49:10 2021] broker: blinker
[21:49:10 2021] clientID:
[21:49:10 2021] userName:
[21:49:10 2021] password: QykAMBvY4gaCm3Red6AKAURQGqtcmnJE
[21:49:10 2021] subtopic:
[21:49:10 2021] pubtopic:
Traceback (most recent call last):
  File "p.py", line 21, in <module>
    Blinker.begin(auth)
  File "/usr/local/lib/python3.7/dist-packages/Blinker-0.2.0-py3.7.egg/Blinker/Blinker.py", line 171, in begin
    bProto.conn1.start(auth, bProto.aliType, bProto.duerType, bProto.miType)
  File "/usr/local/lib/python3.7/dist-packages/Blinker-0.2.0-py3.7.egg/BlinkerAdapters/BlinkerMQTT.py", line 328, in start
    self.client.connect(self.bmqtt.host, self.bmqtt.port, 60)
  File "/usr/local/lib/python3.7/dist-packages/paho_mqtt-1.5.1-py3.7.egg/paho/mqtt/client.py", line 940, in connect
    bind_address, bind_port, clean_start, properties)
  File "/usr/local/lib/python3.7/dist-packages/paho_mqtt-1.5.1-py3.7.egg/paho/mqtt/client.py", line 1005, in connect_async
    raise ValueError('Invalid host.')
ValueError: Invalid host.


 楼主| 发表于 2021-10-1 21:53 | 显示全部楼层
各位大佬我的是树莓派4b 系统内核版本是5.10.17-v8+  ,我的python运行环境是不是有问题
发表于 2021-10-2 00:02 | 显示全部楼层
1,看一下python安装在哪里?
where python
2,安装或者内联一下python3.7
sudo apt-get install python3.7
sudo ln -s /usr/bin/python3.7 /usr/bin/python
 楼主| 发表于 2021-10-2 00:20 | 显示全部楼层
topdog 发表于 2021-10-2 00:02
1,看一下python安装在哪里?
where python
2,安装或者内联一下python3.7

python安装没有问题
root@raspberrypi:/opt# whereis python
python: /usr/bin/python /usr/bin/python3.7-config /usr/bin/python3.7 /usr/bin/python3.7m-config /usr/bin/python3.7m /usr/bin/python2.7 /usr/bin/python2.7-config /usr/lib/python3.7 /usr/lib/python2.7 /etc/python /etc/python3.7 /etc/python2.7 /usr/local/lib/python3.7 /usr/local/lib/python2.7 /usr/include/python3.7 /usr/include/python3.7m /usr/include/python2.7 /usr/share/python /usr/share/man/man1/python.1.gz
 楼主| 发表于 2021-10-2 00:21 | 显示全部楼层
小明没吃饱 发表于 2021-10-2 00:20
python安装没有问题
root@raspberrypi:/opt# whereis python
python: /usr/bin/python /usr/bin/python3. ...

root@raspberrypi:/opt# python --version
Python 3.7.3
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 11:52 , Processed in 0.281028 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表