Problems with command line sensor - update

Greetings,

I’ve been using python3 -c “import requests; print(requests.get(‘https://pypi.python.org/pypi/homeassistant/json’).json()[‘info’]['version’])” for some time which worked well. Some days ago, it stopped working. I have updated to the latest dev and I still can’t get it working.
Before I was getting the following:

[sleekxmpp.xmlstream.resolver] Could not find dnspython package. Not all features will be available

I installed python-dns, that message doesn’t show up anymore but it’s still erroring out:

INFO (Thread-4) [homeassistant.components.sensor.command_line] Running command: python3 -c “import requests; print(requests.get(‘https://pypi.python.org/pypi/homeassistant/json’).json()[‘info’]['version’])”
ERROR (Thread-4) [homeassistant.components.sensor.command_line] Command failed: python3 -c “import requests; print(requests.get(‘https://pypi.python.org/pypi/homeassistant/json’).json()[‘info’]['version’])”

Any ideas what could be wrong?

Many thanks!

Log into you HA box and try running the command manually and post the result. Personally, I always use full path when running commands to avoid depending on $PATH or other relative path nuances. Also try:

/usr/bin/python3  -c "import requests; print(requests.get(‘https://pypi.python.org/pypi/homeassistant/json’).json()[‘info’]['version1’])"

Or whichever path your python3 is installed.

Thanks, hass, it was the PATH. Funny that it was working before.
Appreciate the help.