Unstructured-IO / Unstructured-IO/unstructured

Cannot call Unstructured (with API key) using Haystack - HTTP/1.1 400 Bad Request error. Failed to partition set 3.

Open
#3,988 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
15.5k
Forks
1.3k
Avg merge
4d 2h
Merged PRs (30d)
13

Description

I am having some trouble using Unstructured from within Haystack. I've asked for help on Haystack but the maintainer working on my request directed me to Unstructured. (FWIW, I used the Unstructured free tier a few months ago, but I am now trying to use the paid developer tier, since I've used up my free tier).

So here is what I have done. I created an unstructured account and added my billing information and created a new API key. Then I made the call to create a Haystack Document as:

path = "../KUBIENT,INC_07_02_2020-EX-10.14-MASTER SERVICES AGREEMENT_Part1.pdf"
converter = UnstructuredFileConverter(api_url = "https://api.unstructuredapp.io/general/v0/general", api_key = Secret.from_env_var("UNSTRUCTURED_API_KEY", strict=False), progress_bar=True)
docs = converter.run(paths=[path])

I got this to work once (I can also see that I got billed for it). And ever since I've tried again, it does not work! The error I get is:

Converting files to Haystack Documents: 0it [00:00, ?it/s]INFO: HTTP Request: GET https://api.unstructuredapp.io/general/docs "HTTP/1.1 200 OK"
INFO: HTTP Request: POST https://api.unstructuredapp.io/general/v0/general "HTTP/1.1 400 Bad Request"
ERROR: Failed to partition set 3.
WARNING: Unstructured could not process file ..\KUBIENT,INC_07_02_2020-EX-10.14-MASTER SERVICES AGREEMENT_Part1.pdf. Error: Unexpected response received (code: 500, type: text/plain): Status 500
Bad Request

I would appreciate it if someone could help. Thanks in advance for your time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is identified. Start by reproducing the Haystack UnstructuredFileConverter call with the cited PDF and API endpoint, then inspect the 400 response and “Failed to partition set 3” message. Done means the conversion succeeds for that case or the issue records a clear diagnosis and required action.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.