完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
本帖最后由 z***hello 于 2015-12-9 23:20 编辑 这次试验主要是体验一下WRTNode的网络功能,利用python强大的网络功能1、安装python opkg install python
|
|
相关推荐
9 个讨论
|
|
|
谢谢楼主的分享了!
|
|
|
|
|
|
|
|
|
root@OpenWrt:/MyPython# python weather.py
Traceback (most recent call last): File "weather.py", line 9, in ddata = json.loads(data); File "/usr/lib/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded root@OpenWrt:/MyPython# 请问执行你的代码出现这个错误怎么解决呀? 程序和你贴出来的一样 |
|
|
|
|
|
|
|
|
我进那个网址是正确的,只是不能显示中文
网址:http://www.weather.com.cn/adat/sk/101270401.html 下面是网页显示的内容: {"weatherinfo":{"city":"缁甸槼","cityid":"101270401","temp":"17","WD":"涓滃寳椋�","WS":"2绾�","SD":"59%","WSE":"2","time":"10:25","isRadar":"1","Radar":"JC_RADAR_AZ9816_JB","njd":"鏆傛棤瀹炲喌","qy":"952"}} 信息是正确的,麻烦看下,谢谢 |
|
|
|
|
|
|
|
|
需要哪些主件呢,我安装的python 2.7.9
root@OpenWrt:/# python Python 2.7.9 (default, Dec 27 2015, 22:44:50) [GCC 4.8.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 运行是没有错误的 root@OpenWrt:/# ping www.baidu.com PING www.baidu.com (119.75.218.70): 56 data bytes 64 bytes from 119.75.218.70: seq=0 ttl=52 time=42.081 ms 64 bytes from 119.75.218.70: seq=1 ttl=52 time=44.773 ms 64 bytes from 119.75.218.70: seq=2 ttl=52 time=42.449 ms 64 bytes from 119.75.218.70: seq=3 ttl=52 time=42.121 ms 64 bytes from 119.75.218.70: seq=4 ttl=52 time=42.211 ms 64 bytes from 119.75.218.70: seq=5 ttl=52 time=41.703 ms 额,刚才又试了下,可以了,谢谢大兄弟的解答 root@OpenWrt:/MyPython# python weather.py city:mian_yang 101270401 10:25 temperature: 17 |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
9680 浏览 0 评论
【KV260视觉入门套件试用体验】四、KV260 视觉入门套件和固件更新
10519 浏览 0 评论
【KV260视觉入门套件试用体验】Vitis AI Library体验之OCR识别
9616 浏览 0 评论
【KV260视觉入门套件试用体验】Vitis AI 通过迁移学习训练自定义模型
10498 浏览 0 评论
【KV260视觉入门套件试用体验】KV260系列之Petalinux镜像+Resnet 50探索
9767 浏览 0 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-15 03:25 , Processed in 1.441697 second(s), Total 63, Slave 52 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
12570