【发布时间】:2015-09-29 07:12:05
【问题描述】:
我有一个使用这个 curl 命令的 python 脚本:
stream = os.popen("curl -s 'http://someip/json.htm?type=devices&rid=7'| jq -r .result[].Data")
当我通过 fowwlong cron 在我的树莓派启动时加载此脚本时
@reboot /usr/bin/screen -dmSL elec /home/pi/domoticz/scripts/python/elec.py
一切都很好。但是几天以来,我遇到了这个错误:
sh: 1: jq: not found
如果我停止脚本并重新启动它,一切正常。
每个人都有解决这个问题的想法吗?
【问题讨论】:
-
一开始为什么要用python、curl和jq组合呢? Python 已经有了 urllib 和 json 解析器
标签: python raspberry-pi crontab jq