Skip to content
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

Receiving an error 'urllib3.exceptions.LocationValueError: No host specified.' #61

Open
anirudh-gapblue opened this issue May 21, 2024 · 0 comments

Comments

@anirudh-gapblue
Copy link

While trying to run

llmsherpa_api_url = "http://localhost:5010/api/parseDocument?renderFormat=all&useNewIndentParser=true"
pdf_url = "<path_to_file>//Apple.pdf" # also allowed is a file path e.g. /home/downloads/xyz.pdf
# pdf_url = "https://arxiv.org/pdf/2212.14024.pdf"
pdf_reader = LayoutPDFReader(llmsherpa_api_url)
doc = pdf_reader.read_pdf(pdf_url)

for chunk in doc.chunks():
    text=chunk.to_context_text()
    print(text)

I received File "\venv\lib\site-packages\urllib3\poolmanager.py", line 236, in connection_from_host raise LocationValueError("No host specified.") urllib3.exceptions.LocationValueError: No host specified.

I have 3 terminals active with java -jar tika-server-standard-nlm-modified-2.4.1_v6.jar, python -m lm_ingestor.ingestion_daemon, docker run -p 5010:5001 ghcr.io/nlmatics/nlm-ingestor:latest.
All of them are working fine since curl I HTTP://localhost:<port> returns a response of 200

Please Help!!

python version: 3.9.13
urllib version: 1.26.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant