Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 500 when computing zim-file attribute #112

Open
benoit74 opened this issue Feb 3, 2025 · 0 comments
Open

HTTP 500 when computing zim-file attribute #112

benoit74 opened this issue Feb 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@benoit74
Copy link
Collaborator

benoit74 commented Feb 3, 2025

1738458321524	ERROR: unsupported operand type(s) for +: 'NoneType' and 'str'
1738458321524	Traceback (most recent call last):
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 165, in __call__
1738458321524	    await self.app(scope, receive, _send)
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
1738458321524	    await self.simple_response(scope, receive, send, request_headers=headers)
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/middleware/cors.py", line 144, in simple_response
1738458321524	    await self.app(scope, receive, send)
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
1738458321524	    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
1738458321524	    raise exc
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
1738458321524	    await app(scope, receive, sender)
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 715, in __call__
1738458321524	    await self.middleware_stack(scope, receive, send)
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 735, in app
1738458321524	    await route.handle(scope, receive, send)
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 288, in handle
1738458321524	    await self.app(scope, receive, send)
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 76, in app
1738458321524	    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
1738458321524	    raise exc
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
1738458321524	    await app(scope, receive, sender)
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 73, in app
1738458321524	    response = await f(request)
1738458321524	               ^^^^^^^^^^^^^^^^
1738458321524	  File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 301, in app
1738458321524	    raw_response = await run_endpoint_function(
1738458321524	                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1738458321524	  File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
1738458321524	    return await run_in_threadpool(dependant.call, **values)
1738458321524	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1738458321524	  File "/usr/local/lib/python3.12/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
1738458321524	    return await anyio.to_thread.run_sync(func, *args)
1738458321524	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1738458321524	  File "/usr/local/lib/python3.12/site-packages/anyio/to_thread.py", line 56, in run_sync
1738458321524	    return await get_async_backend().run_sync_in_worker_thread(
1738458321524	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1738458321524	  File "/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 2461, in run_sync_in_worker_thread
1738458321524	    return await future
1738458321524	           ^^^^^^^^^^^^
1738458321524	  File "/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 962, in run
1738458321524	    result = context.run(func, *args)
1738458321524	             ^^^^^^^^^^^^^^^^^^^^^^^^
1738458321524	  File "/usr/local/lib/python3.12/site-packages/zimitfrontend/routes/requests.py", line 68, in create_task
1738458321524	    flags["zim-file"] = flags.get("zim-file", url.hostname) + f"_{ident}.zim"
1738458321524	                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
1738458321524	TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
1738458321524	INFO:     100.64.6.209:58384 - "POST /api/v1/requests HTTP/1.1" 500 Internal 
@benoit74 benoit74 added the bug Something isn't working label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant