-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
AttributeError: 'NoneType' object has no attribute 'bboxes' #123
Comments
same here, have you figured out what's wrong with that? |
Downgrading gradio version helped me, I don't have access to my laptop at the moment but somewhere in the issues section you may find the exact version |
This is so strange, I don't even have Gradio in the environment where I run the marker. |
Oh my bad the gradio part is what I was working on. As far as I remember, this was a problem with one of the packages in poetry. Take a look at my pyproject.toml: [tool.poetry] [tool.poetry.dependencies] [tool.poetry.group.dev.dependencies] [tool.poetry.scripts] [build-system] |
Detecting bboxes: 100%|██████████| 2/2 [00:05<00:00, 2.96s/it]
Finding reading order: 100%|██████████| 1/1 [00:04<00:00, 4.89s/it]
Traceback (most recent call last):
File "/app/convert_single.py", line 35, in
main()
File "/app/convert_single.py", line 26, in main
full_text, images, out_meta = convert_single_pdf(fname, model_lst, max_pages=args.max_pages, langs=langs, batch_multiplier=args.batch_multiplier)
File "/app/marker/convert.py", line 115, in convert_single_pdf
table_count = format_tables(pages)
File "/app/marker/tables/table.py", line 138, in format_tables
table_rows = get_table_pdftext(page, table_box)
File "/app/marker/tables/table.py", line 103, in get_table_pdftext
table_rows = assign_cells_to_columns(page, table_box, table_rows)
File "/app/marker/tables/cells.py", line 56, in assign_cells_to_columns
separators = find_column_separators(page, table_box, round_factor=round_factor)
File "/app/marker/tables/cells.py", line 31, in find_column_separators
line_boxes = [p.bbox for p in page.text_lines.bboxes]
AttributeError: 'NoneType' object has no attribute 'bboxes'
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/marker-pdf-9TtSrW0h-py3.9/lib/python3.9/site-packages/gradio/routes.py", line 534, in predict
output = await route_utils.call_process_api(
File "/root/.cache/pypoetry/virtualenvs/marker-pdf-9TtSrW0h-py3.9/lib/python3.9/site-packages/gradio/route_utils.py", line 226, in call_process_api
output = await app.get_blocks().process_api(
File "/root/.cache/pypoetry/virtualenvs/marker-pdf-9TtSrW0h-py3.9/lib/python3.9/site-packages/gradio/blocks.py", line 1550, in process_api
result = await self.call_function(
File "/root/.cache/pypoetry/virtualenvs/marker-pdf-9TtSrW0h-py3.9/lib/python3.9/site-packages/gradio/blocks.py", line 1185, in call_function
prediction = await anyio.to_thread.run_sync(
File "/root/.cache/pypoetry/virtualenvs/marker-pdf-9TtSrW0h-py3.9/lib/python3.9/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/root/.cache/pypoetry/virtualenvs/marker-pdf-9TtSrW0h-py3.9/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
return await future
File "/root/.cache/pypoetry/virtualenvs/marker-pdf-9TtSrW0h-py3.9/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 851, in run
result = context.run(func, *args)
File "/root/.cache/pypoetry/virtualenvs/marker-pdf-9TtSrW0h-py3.9/lib/python3.9/site-packages/gradio/utils.py", line 661, in wrapper
response = f(*args, **kwargs)
File "/app/run.py", line 21, in _fProcessDocument
subprocess.run(["python", "convert_single.py", input_path, output_path, "--batch_multiplier", workers], check=True)
File "/usr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', 'convert_single.py', '/tmp/gradio/c6f053961a397c3a97eb85201dfeabffc5a9331c/Managing the Design Process-Chpt 6.pdf', '/tmp/gradio/c6f053961a397c3a97eb85201dfeabffc5a9331c/Chapter6/output.md', '--batch_multiplier', '4']' returned non-zero exit status 1.
The text was updated successfully, but these errors were encountered: