Foris crash message
remote Exception: Internal error ['uci', '-c', '/etc/config/', '-P', '/tmp/.uci-foris-controller', 'set', 'system.ntp.enabled=1']: command failed (b'uci: Invalid argument\n')('<class 'foris_controller.exceptions.UciException'>')
Remote request
{"module": "time", "action": "update_settings", "kind": "request", "data": {"city": "Berlin", "country": "DE", "region": "Europe", "timezone": "CET-1CEST,M3.5.0,M10.5.0/3", "time_settings": {"how_to_set_time": "ntp"}}}
Stack trace
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/foris_controller/message_router.py", line 117, in process_message
data = module_instance.perform_action(message["action"], message.get("data", {}))
File "/usr/lib/python3.6/site-packages/foris_controller/module_base.py", line 59, in perform_action
res = action_function(data)
File "/usr/lib/python3.6/site-packages/foris_controller_modules/time/__init__.py", line 59, in action_update_settings
time,
File "/usr/lib/python3.6/site-packages/foris_controller/utils.py", line 112, in inner
res = func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/foris_controller_modules/time/handlers/openwrt.py", line 67, in update_settings
return self.uci.update_settings(region, country, city, timezone, how_to_set_time, time)
File "/usr/lib/python3.6/site-packages/foris_controller_backends/time/__init__.py", line 102, in update_settings
backend.set_option("system", "ntp", "enabled", store_bool(how_to_set_time == "ntp"))
File "/usr/lib/python3.6/site-packages/foris_controller_backends/uci/__init__.py", line 200, in set_option
self._run_uci_command("set", "%s.%s.%s=%s" % (config, section_name, option_name, value))
File "/usr/lib/python3.6/site-packages/foris_controller_backends/uci/__init__.py", line 173, in _run_uci_command
raise UciException(cmdline_args, stderr)
foris_controller.exceptions.UciException: ['uci', '-c', '/etc/config/', '-P', '/tmp/.uci-foris-controller', 'set', 'system.ntp.enabled=1']: command failed (b'uci: Invalid argument\n')
Environment
{'CONTENT_LENGTH': '126',
'CONTENT_TYPE': 'application/x-www-form-urlencoded',
'DOCUMENT_ROOT': '/www',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': '*',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_CONTENT_LENGTH': '126',
'HTTP_COOKIE': 'foris.session=9a652073e61fdd117e36ea729e2f29f1; '
'foris.ws.session=a70582cb26f85e16f060daec3d05f43f',
'HTTP_DNT': '1',
'HTTP_HOST': '192.168.1.1',
'HTTP_REFERER': 'http://192.168.1.1',
'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 '
'Firefox/66.0',
'PATH_INFO': '/main/time/',
'PATH_TRANSLATED': '/www/main/time/',
'QUERY_STRING': '',
'REDIRECT_STATUS': '200',
'REMOTE_ADDR': '192.168.1.224',
'REMOTE_PORT': '7180',
'REQUEST_METHOD': 'POST',
'REQUEST_SCHEME': 'http',
'REQUEST_URI': '/foris/config/main/time/',
'SCRIPT_FILENAME': '/www/foris/config',
'SCRIPT_NAME': '/foris/config',
'SERVER_ADDR': '192.168.1.1',
'SERVER_NAME': '192.168.1.1',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'lighttpd/1.4.50',
'bottle.app': <bottle.Bottle object at 0x1a17e60>,
'bottle.raw_path': '/time/',
'bottle.request': <LocalRequest: POST http://192.168.1.1/foris/config/main/time/>,
'bottle.request.body': <_io.BytesIO object at 0x1b9d350>,
'bottle.request.headers': <bottle.WSGIHeaderDict object at 0x1bbf070>,
'bottle.request.post': {'country': 'DE',
'csrf_token': 'xT33wMm5hU0FPUlvXmAL2xMg2GpLED0a',
'region': 'Europe',
'send': '',
'zonename': 'Europe/Berlin'},
'bottle.request.urlparts': SplitResult(scheme='http', netloc='192.168.1.1', path='/foris/config/main/time/', query='', fragment=''),
'bottle.route': <POST '/<page_name:re:.+>/' <function config_page_post at 0x1a079a0>>,
'foris.backend': MqttSender('localhost:11883'),
'foris.language': 'en',
'foris.session': <foris.middleware.sessions.SessionForisProxy object at 0x1bb90f0>,
'foris.session.data': {'_messages': [],
'csrf_token': 'xT33wMm5hU0FPUlvXmAL2xMg2GpLED0a',
'user_authenticated': True},
'foris.session.id': '9a652073e61fdd117e36ea729e2f29f1',
'foris.version': '99.7.5',
'route.handle': <POST '/<page_name:re:.+>/' <function config_page_post at 0x1a079a0>>,
'route.url_args': {'page_name': 'time'},
'wsgi.errors': <flup.server.fcgi_base.OutputStream object at 0x1bb3a80>,
'wsgi.input': <_io.BytesIO object at 0x1b9d350>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}