Closed zonia3000 closed 2 months ago
The new form with the warning message:
Very minor details:
source
attribute, I think we should not suggest such a complex example (see reasoning in https://github.com/fractal-analytics-platform/fractal-web/issues/517#issuecomment-2210536532). If we still want to include an example, then the message could read something likeA common label identifying this package (e.g. if you set this to
"mypackage"
then tasks will have source like"myusername:mypackage:task_module_name"
).
I hit what seems like a glitch in the UI for the new endpoint.
How to reproduce
package_name
or package_root
must be provided). The error is shown below the form.package_name
to somethingUncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
handleCollect CustomEnvTask.svelte:110
AsyncFunctionThrow self-hosted:803
(Async: async)
prevent_default index.mjs:432
(Async: EventListener.handleEvent)
listen index.mjs:425
listen_dev index.mjs:2282
mount CustomEnvTask.svelte:868
m svelte-hooks.js:291
mount_component index.mjs:2054
mount +page.svelte:76
update +page.svelte:947
update index.mjs:1298
flush index.mjs:1258
(Async: promise callback)
schedule_update index.mjs:1209
make_dirty index.mjs:2090
ctx index.mjs:2128
input3_change_handler +page.svelte:1132
(Async: EventListener.handleEvent)
listen index.mjs:425
listen_dev index.mjs:2282
mount +page.svelte:895
m svelte-hooks.js:291
mount_component index.mjs:2054
mount root.svelte:266
mount root.svelte:548
mount +layout.svelte:1186
m svelte-hooks.js:291
mount_component index.mjs:2054
mount root.svelte:168
mount root.svelte:744
mount_component index.mjs:2054
init index.mjs:2152
Root root.svelte:1000
createProxiedComponent svelte-hooks.js:341
ProxyComponent proxy.js:242
Proxy<Root> proxy.js:349
initialize client.js:304
_hydrate client.js:1849
InterpretGeneratorResume self-hosted:1412
AsyncFunctionNext self-hosted:799
(Async: async)
start start.js:22
<anonymous> tasks:2927
(Async: promise callback)
<anonymous> tasks:2926
while logs of backend and frontend don't show anything specially relevant.
Here is a screenshot of the final state:
The JSON parse error happens because there is an Internal Server Error on the backend and it doesn't return a JSON response. This happens when the Python Intepreter is set to a not existing file.
I've the following error in backend:
Traceback (most recent call last):
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
return await self.app(scope, receive, send)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
raise exc
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/routing.py", line 756, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/routing.py", line 776, in app
await route.handle(scope, receive, send)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/starlette/routing.py", line 72, in app
response = await func(request)
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app
raw_response = await run_endpoint_function(
File "/home/xonya/code/fractal-server/venv/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
File "/home/xonya/code/fractal-server/fractal_server/app/routes/api/v2/task_collection_custom.py", line 66, in collect_task_custom
res = subprocess.run( # nosec
File "/usr/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/foo'
Checklist before merging
CHANGELOG.md
Closes #517