Traceback (most recent call last):
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\uvicorn\protocols\http\httptools_impl.py", line 404, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\uvicorn\middleware\proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\fastapi\applications.py", line 270, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\starlette\applications.py", line 124, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\starlette\middleware\errors.py", line 184, in __call__
raise exc
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\starlette\middleware\errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\starlette\middleware\exceptions.py", line 75, in __call__
raise exc
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\starlette\middleware\exceptions.py", line 64, in __call__
await self.app(scope, receive, sender)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\fastapi\middleware\asyncexitstack.py", line 21, in __call__
raise e
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\starlette\routing.py", line 680, in __call__
await route.handle(scope, receive, send)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\starlette\routing.py", line 275, in handle
await self.app(scope, receive, send)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\starlette\routing.py", line 65, in app
response = await func(request)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\fastapi\routing.py", line 231, in app
raw_response = await run_endpoint_function(
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\fastapi\routing.py", line 160, in run_endpoint_function
return await dependant.call(**values)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\.\backend\routers\library.py", line 31, in upload
return await handler.upload_ebook(
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\.\backend\handlers\lib_handlers.py", line 55, in upload_ebook
await grid_in.write(tmp_file.file)
File "C:\Users\ktako\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\ktako\OneDrive\Documents\Repositories\ebook-collector\__pypackages__\3.10\lib\gridfs\grid_file.py", line 375, in write
to_write = read(self.chunk_size)
File "C:\Users\ktako\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 747, in read
return self._file.read(*args)
ValueError: I/O operation on closed file.
This won't show if your file already exists in VT database, since it checks for hash.