adithya-s-k / omniparse

Ingest, parse, and optimize any data format ➡️ from documents to multimedia ➡️ for enhanced compatibility with GenAI frameworks
https://docs.cognitivelab.in
GNU General Public License v3.0
4.37k stars 350 forks source link

TypeError: expected str, bytes or os.PathLike object, not NoneType #40

Open lspneo2018 opened 2 weeks ago

lspneo2018 commented 2 weeks ago

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/gradio/queueing.py", line 541, in process_events response = await route_utils.call_process_api( File "/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py", line 276, in call_process_api output = await app.get_blocks().process_api( File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1928, in process_api result = await self.call_function( File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1514, in call_function prediction = await anyio.to_thread.run_sync( File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread return await future File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 859, in run result = context.run(func, args) File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 833, in wrapper response = f(args, **kwargs) File "/app/omniparse/demo.py", line 177, in parse_document file_extension = os.path.splitext(input_file_path)[1].lower() File "/usr/lib/python3.10/posixpath.py", line 118, in splitext p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType

Tendo33 commented 2 weeks ago

Occasionally encounter this issue where, using the same files, continuously receive the same error, but success is achieved upon multiple retries. Why does this happen?

adithya-s-k commented 4 days ago

This is interesting i havent personally faced it i think it because when upload the same file multiple times that might lead to some sort of concurrency issue, Not really sure

@Tendo33 would like to know what you did when you faced this issue ?

Tendo33 commented 3 days ago

I think the issue is with uploading files and paths, such as having "/" in the file name.