Skip to content

[BUG: Breaking] - wrong URL #1086

Description

@notesjor

🧨 Describe the Bug

If I run
marker_single ./test.pdf --output_format json --output_dir output/ --disable_image_extraction --mode fast
so, i tried to force the SURYA URL by calling:
SURYA_INFERENCE_URL="http://127.0.0.1:40661" marker_single ./test.pdf --output_format json --output_dir output/ --disable_image_extraction --mode fast
but, the same result - your code doubles the /v1/v1

📤 Output Trace / Stack Trace

Traceback (most recent call last):
  File "/home/ruediger/.local/bin/marker_single", line 8, in <module>
    sys.exit(convert_single_cli())
             ^^^^^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/click/core.py", line 1569, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/click/core.py", line 1490, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/click/core.py", line 1353, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/click/core.py", line 907, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/marker/scripts/convert_single.py", line 38, in convert_single_cli
    rendered = converter(fpath)
               ^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/marker/converters/pdf.py", line 213, in __call__
    document = self.build_document(temp_path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/marker/converters/pdf.py", line 200, in build_document
    document = DocumentBuilder(self.config)(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/marker/builders/document.py", line 56, in __call__
    layout_builder(document, provider)
  File "/home/ruediger/.local/lib/python3.12/site-packages/marker/builders/layout.py", line 108, in __call__
    layout_results = self.surya_layout(document.pages, provider)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/marker/builders/layout.py", line 158, in surya_layout
    raster, model([images[i] for i in raster], use_order=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/surya/fast_layout/__init__.py", line 175, in __call__
    return self._client(images, threshold=threshold, use_order=use_order)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/surya/fast_layout/client.py", line 46, in __call__
    return self._client.infer(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/ruediger/.local/lib/python3.12/site-packages/surya/common/batch_service/client.py", line 134, in infer
    resp.raise_for_status()
  File "/home/ruediger/.local/lib/python3.12/site-packages/httpx/_models.py", line 829, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '500 Internal Server Error' for url 'http://127.0.0.1:40661/v1/v1/infer'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500

⚙️ Environment

  • Marker version: 2.0.0
  • Surya version: 0.22.1
  • Python version: 3.12
  • PyTorch version: 2.13.0
  • Transformers version: 5.15.0
  • Operating System (incl. container info if relevant): Rocky Linux release 9.8 (Blue Onyx)

✅ Expected Behavior

convert the document

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: breakingCrashes, errors, anything that stops execution or is runtime-breaking

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions