Skip to content

default value and variable error #320

@antonellocaroli

Description

@antonellocaroli

Hi,
I'm not sure if this is expected behavior or a bug.

###############################
{
"name": "Select seftware to set",
"param": "-b",
"type": "list",
"default": "networkaudiod",
"values": [
"networkaudiod",
"squeezelite-R2",
"squeezelite"
],
"description": "Select seftware to set"
},
{
"name": "Set affinity",
"param": "-c",
"type": "text",
"default": {
"script": "/opt/.gentooplayer/web/scripts/script/expert1/${Select seftware to set}/affinity.sh"
},
"description": "Set CPU affinity"
},
################################

2020-07-12 07:27:23,794 [root.INFO] Starting GentooPlayer, v1.16.0-master@995fec1
2020-07-12 07:27:23,811 [asyncio.DEBUG] Using selector: EpollSelector
Server is running on: http://0.0.0.0:5000
2020-07-12 07:27:27,678 [identification.INFO] Assigned user_id=192.168.178.22-6d9fb38bcbd547e6 to {'ip': '192.168.178.22', 'hostname': 'GentooServer.fritz.box'}
2020-07-12 07:27:27,719 [tornado.access.INFO] 304 GET /index.html (192.168.178.22) 45.99ms
2020-07-12 07:27:27,748 [tornado.access.INFO] 304 GET /css/chunk-index-vendors.47bd9eac.css (192.168.178.22) 3.77ms
2020-07-12 07:27:27,758 [tornado.access.INFO] 304 GET /css/index.00b840dd.css (192.168.178.22) 7.60ms
2020-07-12 07:27:27,763 [tornado.access.INFO] 304 GET /js/chunk-index-vendors.3dee9c44.js (192.168.178.22) 10.09ms
2020-07-12 07:27:27,766 [tornado.access.INFO] 304 GET /js/index.807c7662.js (192.168.178.22) 11.71ms
2020-07-12 07:27:27,800 [tornado.access.INFO] 304 GET /favicon.ico (192.168.178.22) 3.14ms
2020-07-12 07:27:27,836 [tornado.access.INFO] 304 GET /img/titleBackground_small.8d99a14e.jpg (192.168.178.22) 3.40ms
2020-07-12 07:27:27,842 [tornado.access.INFO] 304 GET /executions/active (192.168.178.22) 3.13ms
2020-07-12 07:27:27,847 [tornado.access.INFO] 304 GET /auth/info (192.168.178.22) 4.36ms
2020-07-12 07:27:27,849 [tornado.access.INFO] 304 GET /conf (192.168.178.22) 5.11ms
2020-07-12 07:27:27,880 [tornado.access.INFO] 304 GET /scripts (192.168.178.22) 35.12ms
2020-07-12 07:27:27,895 [tornado.access.INFO] 101 GET /scripts/Set%20software (192.168.178.22) 3.91ms
2020-07-12 07:27:27,947 [web_server.ERROR] Failed to load script config Set software
Traceback (most recent call last):
File "src/web/server.py", line 268, in open
self.config_model = yield load_config_future
File "/usr/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "src/config/config_service.py", line 124, in load_config_model
return self._load_script_config(path, json_object, user, parameter_values)
File "src/config/config_service.py", line 188, in _load_script_config
parameter_values=parameter_values)
File "src/model/script_config.py", line 66, in init
self._init_parameters(username, audit_name)
File "src/model/script_config.py", line 139, in _init_parameters
self.working_directory)
File "src/model/parameter_config.py", line 54, in init
self._reload()
File "src/model/parameter_config.py", line 74, in _reload
self.default = _resolve_default(config.get('default'), self._username, self._audit_name, self._working_dir)
File "src/model/parameter_config.py", line 419, in _resolve_default
output = process_utils.invoke(resolved_string_value, working_dir)
File "src/utils/process_utils.py", line 27, in invoke
universal_newlines=True)
File "/usr/lib/python3.7/subprocess.py", line 800, in init
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/opt/.gentooplayer/web/scripts/script/expert1/${Select': '/opt/.gentooplayer/web/scripts/script/expert1/${Select'

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions