marker icon indicating copy to clipboard operation
marker copied to clipboard

unable to run marker gui or through code:

Open ashunaveed opened this issue 11 months ago • 2 comments

unable to run the code: (marker) C:\Windows\System32>marker_gui

  Welcome to Streamlit!

  If you’d like to receive helpful onboarding emails, news, offers, promotions,
  and the occasional swag, please enter your email address below. Otherwise,
  leave this field blank.

  Email:

You can find our privacy policy at https://streamlit.io/privacy-policy

Summary:

  • This open source library collects usage statistics.

  • We cannot see and do not store information contained inside Streamlit apps, such as text, charts, images, etc.

  • Telemetry data is stored in servers in the United States.

  • If you'd like to opt out, add the following to %userprofile%/.streamlit/config.toml, creating that file if necessary:

    [browser] gatherUsageStats = false

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501 Network URL: http://192.168.0.101:8501

2025-01-04 11:21:04.389 Uncaught app execution Traceback (most recent call last): File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 579, in code_to_exec exec(code, module.dict) File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\marker_app.py", line 3, in from marker.settings import settings File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\marker_init_.py", line 16, in from .settings import version ImportError: cannot import name 'version' from 'marker.settings' (C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\marker\settings.py) 2025-01-04 11:21:04.533 Examining the path of torch.classes raised: Tried to instantiate class 'path.path', but it does not exist! Ensure that it is registered via torch::class

image_2025-01-04_112221667

ashunaveed avatar Jan 04 '25 05:01 ashunaveed

Unable to run the code: (marker) C:\Windows\System32>marker_gui You can now view your Streamlit app in your browser. Local URL: http://localhost:8501 Network URL: http://192.168.0.101:8501 config.json: 100%|████████████████████████████████████████████████████████████████| 6.01k/6.01k [00:00<00:00, 6.01MB/s] model.safetensors: 100%|████████████████████████████████████████████████████████████| 253M/253M [01:46<00:00, 2.38MB/s] Loaded layout model datalab-to/surya_layout on device cuda with dtype torch.float16 Loaded texify model to cuda with torch.float16 dtype Loaded recognition model vikp/surya_rec2 on device cuda with dtype torch.float16 Loaded table recognition model vikp/surya_tablerec on device cuda with dtype torch.float16 Loaded detection model vikp/surya_det3 on device cuda with dtype torch.float16 config.json: 100%|████████████████████████████████████████████████████████████████████████████| 647/647 [00:00<?, ?B/s] model.safetensors: 100%|████████████████████████████████████████████████████████████| 271M/271M [03:26<00:00, 1.31MB/s] tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████| 1.20k/1.20k [00:00<?, ?B/s] vocab.txt: 100%|████████████████████████████████████████████████████████████████████| 996k/996k [00:00<00:00, 1.36MB/s] special_tokens_map.json: 100%|████████████████████████████████████████████████████████████████| 695/695 [00:00<?, ?B/s] tokenizer.json: 100%|█████████████████████████████████████████████████████████████| 2.92M/2.92M [00:01<00:00, 2.06MB/s] 2025-01-07 12:57:06.421 Examining the path of torch.classes raised: Tried to instantiate class 'path.path', but it does not exist! Ensure that it is registered via torch::class 2025-01-07 12:57:54.864 Examining the path of torch.classes raised: Tried to instantiate class 'path.path', but it does not exist! Ensure that it is registered via torch::class 2025-01-07 12:58:20.445 Uncaught app execution Traceback (most recent call last): File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 579, in code_to_exec exec(code, module.dict) File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\marker_app.py", line 140, in rendered = convert_pdf( ^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\marker_app.py", line 37, in convert_pdf return converter(fname) ^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\marker\converters\pdf.py", line 130, in call document = self.build_document(filepath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\marker\converters\pdf.py", line 117, in build_document pdf_provider = PdfProvider(filepath, self.config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\marker\providers\pdf.py", line 36, in init self.doc: pdfium.PdfDocument = pdfium.PdfDocument(self.filepath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\pypdfium2_helpers\document.py", line 78, in init self.raw, to_hold, to_close = _open_pdf(self._input, self._password, self._autoclose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\marker\Lib\site-packages\pypdfium2_helpers\document.py", line 678, in _open_pdf raise PdfiumError(f"Failed to load document (PDFium: {pdfium_i.ErrorToStr.get(err_code)}).") pypdfium2._helpers.misc.PdfiumError: Failed to load document (PDFium: File access error).

ashunaveed avatar Jan 07 '25 07:01 ashunaveed

I hit this issue because I'd accidentally installed marker, then installed marker-pdf, then uninstalled marker. Reinstalling marker-pdf fixed it.

Would be nice if there wasn't a name clash here, but in the end PEBKAC.

robtaylor avatar Jan 24 '25 17:01 robtaylor