You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/python3
from ubus import Ubus
ubus = Ubus('192.168.0.1')
ubus['session']['login'](username='root', password='xxx')
Result:
Traceback (most recent call last):
File "main.py", line 6, in <module>
ubus['session']['login'](username='root', password='xxx')
File "/home/tw/.local/share/virtualenvs/openwrt-wifi-presence-mqtt-L6rf1mrk/lib/python3.8/site-packages/ubus/protocol.py", line 259, in __getitem__
if item not in self.namespaces:
File "/home/tw/.local/share/virtualenvs/openwrt-wifi-presence-mqtt-L6rf1mrk/lib/python3.8/site-packages/ubus/protocol.py", line 247, in namespaces
self._ifaces = self._fetch_ifaces()
File "/home/tw/.local/share/virtualenvs/openwrt-wifi-presence-mqtt-L6rf1mrk/lib/python3.8/site-packages/ubus/protocol.py", line 251, in _fetch_ifaces
ifaces = {x: UbusNamespace(self, x) for x in self._do_request('list', '*', '')}
File "/home/tw/.local/share/virtualenvs/openwrt-wifi-presence-mqtt-L6rf1mrk/lib/python3.8/site-packages/ubus/protocol.py", line 242, in _do_request
raise UbusException("Got a non-200 retcode: %s" % res.status_code)
ubus.protocol.UbusException: Got a non-200 retcode: 404
The text was updated successfully, but these errors were encountered:
Tested against openwrt-19.07:
Result:
The text was updated successfully, but these errors were encountered: