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

bug/ServerError #3826

Closed
rutvikjshah opened this issue Dec 13, 2024 · 3 comments
Closed

bug/ServerError #3826

rutvikjshah opened this issue Dec 13, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@rutvikjshah
Copy link

rutvikjshah commented Dec 13, 2024

Describe the bug

Subject: Assistance Required with Error ServerError: {"detail":"HTTP Error 403: Forbidden"}

Hi Team/ @MthwRobinson ,

I am currently developing my unstructured pipelines using your open-source product, but I’ve encountered an issue that’s preventing me from proceeding.

Yesterday, the code was running smoothly; however, today, I am consistently facing the following error. I reviewed the documentation, which suggests that the issue might be related to an incorrect API key. However, I created my free account just yesterday, and everything worked fine at that time.

I have attached screenshots and detailed error logs below for your reference. Could you please help resolve this issue? If the problem lies on my end, kindly guide me so I can address it accordingly.

Screenshot 2024-12-13 at 4 40 57 PM Screenshot 2024-12-13 at 4 46 55 PM

⚠️ Error

INFO: Preparing to split document for partition.
INFO: Starting page number set to 1
INFO: Allow failed set to 0
INFO: Concurrency level set to 5
INFO: Splitting pages 1 to 6 (6 total)
INFO: Determined optimal split size of 2 pages.
INFO: Partitioning 3 files with 2 page(s) each.
INFO: Partitioning set #1 (pages 1-2).
INFO: Partitioning set #2 (pages 3-4).
INFO: Partitioning set #3 (pages 5-6).
INFO: HTTP Request: GET https://api.unstructured.io/general/docs "HTTP/1.1 200 OK"
INFO: HTTP Request: POST https://api.unstructured.io/general/v0/general "HTTP/1.1 200 OK"
INFO: HTTP Request: POST https://api.unstructured.io/general/v0/general "HTTP/1.1 500 Internal Server Error"
ERROR: Failed to partition set 1.

--------------------------------------------------------------
ServerError                               Traceback (most recent call last)
Cell In[51], [line 22](vscode-notebook-cell:?execution_count=51&line=22)
     [15](vscode-notebook-cell:?execution_count=51&line=15) req = operations.PartitionRequest(
     [16](vscode-notebook-cell:?execution_count=51&line=16)     partition_parameters=shared.PartitionParameters(
     [17](vscode-notebook-cell:?execution_count=51&line=17)         files=files,
     [18](vscode-notebook-cell:?execution_count=51&line=18)     )
     [19](vscode-notebook-cell:?execution_count=51&line=19) )
     [21](vscode-notebook-cell:?execution_count=51&line=21) try:
---> [22](vscode-notebook-cell:?execution_count=51&line=22)     resp = client.general.partition(request=req)
     [23](vscode-notebook-cell:?execution_count=51&line=23) except SDKError as e:
     [24](vscode-notebook-cell:?execution_count=51&line=24)     print(e)

File ~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:107, in General.partition(self, request, retries, server_url, timeout_ms)
    [105](https://file+.vscode-resource.vscode-cdn.net/sample/PycharmProjects/sample-playground/sample/llm/unstructured_io/~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:105) if utils.match_response(http_res, "5XX", "application/json"):
    [106](https://file+.vscode-resource.vscode-cdn.net/sample/PycharmProjects/sample-playground/sample/llm/unstructured_io/~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:106)     data = utils.unmarshal_json(http_res.text, errors.ServerErrorData)
--> [107](https://file+.vscode-resource.vscode-cdn.net/sample/PycharmProjects/sample-playground/sample/llm/unstructured_io/~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:107)     raise errors.ServerError(data=data)
    [109](https://file+.vscode-resource.vscode-cdn.net/sample/PycharmProjects/sample-playground/sample/llm/unstructured_io/~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:109) content_type = http_res.headers.get("Content-Type")
    [110](https://file+.vscode-resource.vscode-cdn.net/sample/PycharmProjects/sample-playground/sample/llm/unstructured_io/~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:110) raise errors.SDKError(
    [111](https://file+.vscode-resource.vscode-cdn.net/sample/PycharmProjects/sample-playground/sample/llm/unstructured_io/~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:111)     f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
    [112](https://file+.vscode-resource.vscode-cdn.net/sample/PycharmProjects/sample-playground/sample/llm/unstructured_io/~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:112)     http_res.status_code,
    [113](https://file+.vscode-resource.vscode-cdn.net/sample/PycharmProjects/sample-playground/sample/llm/unstructured_io/~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:113)     http_res.text,
    [114](https://file+.vscode-resource.vscode-cdn.net/sample/PycharmProjects/sample-playground/sample/llm/unstructured_io/~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:114)     http_res,
    [115](https://file+.vscode-resource.vscode-cdn.net/sample/PycharmProjects/sample-playground/sample/llm/unstructured_io/~/Desktop/POCs/venv/lib/python3.12/site-packages/unstructured_client/general.py:115) )

ServerError: {"detail":"HTTP Error 403: Forbidden"}

Thank you for your support!

Best regards,
Rutvik Shah

To Reproduce
Provide a code snippet that reproduces the issue.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment Info
Please run python scripts/collect_env.py and paste the output here.
This will help us understand more about the environment in which the bug occurred.

Additional context
Add any other context about the problem here.

@rutvikjshah rutvikjshah added the bug Something isn't working label Dec 13, 2024
@ColemanDunn
Copy link

ColemanDunn commented Dec 13, 2024

I am also getting the 403, never have before today

@cragwolfe
Copy link
Contributor

This issue has been resolved.
For reference, this had impacted the Free API but not the Paid API.

Thanks for reporting the issue.

@scanny
Copy link
Collaborator

scanny commented Dec 14, 2024

Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants