Skip to content

bug/error in run_workflow #245

@edoproch

Description

@edoproch

Describe the bug
I'm following the quick start on colab and when I run

response = unstructured_client.workflows.run_workflow(
    request={
        "workflow_id": workflow_id,
    }
)

I got the following error

Error
INFO: HTTP Request: POST https://platform.unstructuredapp.io/api/v1/workflows/10b4a3e8-b738-4ca0-8d2f-76e1cffc40ea/run "HTTP/1.1 202 Accepted"
Traceback (most recent call last):
File "/Users/edo/Desktop/memorAIz/document-ai-python/test_unstructured.py", line 152, in
response = unstructured_client.workflows.run_workflow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/edo/Desktop/memorAIz/document-ai-python/venv/lib/python3.11/site-packages/unstructured_client/workflows.py", line 990, in run_workflow
workflow_information=utils.unmarshal_json(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/edo/Desktop/memorAIz/document-ai-python/venv/lib/python3.11/site-packages/unstructured_client/utils/serializers.py", line 133, in unmarshal_json
return unmarshal(from_json(raw), typ)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/edo/Desktop/memorAIz/document-ai-python/venv/lib/python3.11/site-packages/unstructured_client/utils/serializers.py", line 143, in unmarshal
m = unmarshaller(body=val)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/edo/Desktop/memorAIz/document-ai-python/venv/lib/python3.11/site-packages/pydantic/main.py", line 214, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 5 validation errors for Unmarshaller
body.destinations
Field required [type=missing, input_value={'id': '9086af42-a89c-4df...0583Z', 'runtime': None}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
body.name
Field required [type=missing, input_value={'id': '9086af42-a89c-4df...0583Z', 'runtime': None}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
body.sources
Field required [type=missing, input_value={'id': '9086af42-a89c-4df...0583Z', 'runtime': None}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
body.status
Input should be 'active' or 'inactive' [type=enum, input_value='SCHEDULED', input_type=str]
For further information visit https://errors.pydantic.dev/2.10/v/enum
body.workflow_nodes
Field required [type=missing, input_value={'id': '9086af42-a89c-4df...0583Z', 'runtime': None}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing

To reproduce
Just run the colab notebook

Environment Info
Following the pip freeze output on my machine:
aiobotocore==2.21.1
aiofiles==24.1.0
aiohappyeyeballs==2.5.0
aiohttp==3.11.13
aioitertools==0.12.0
aiosignal==1.3.2
annotated-types==0.7.0
antlr4-python3-runtime==4.9.3
anyio==4.8.0
attrs==25.1.0
backoff==2.2.1
beautifulsoup4==4.13.3
botocore==1.37.1
cachetools==5.5.2
certifi==2025.1.31
cffi==1.17.1
chardet==5.2.0
charset-normalizer==3.4.1
click==8.1.8
coloredlogs==15.0.1
contourpy==1.3.1
cryptography==44.0.2
cycler==0.12.1
dataclasses-json==0.6.7
DateTime==5.5
Deprecated==1.2.18
distro==1.9.0
dotenv==0.9.9
effdet==0.4.1
emoji==2.14.1
et_xmlfile==2.0.0
eval_type_backport==0.2.2
filelock==3.17.0
filetype==1.2.0
flatbuffers==25.2.10
fonttools==4.56.0
frozenlist==1.5.0
fsspec==2025.2.0
google-api-core==2.24.1
google-auth==2.38.0
google-cloud-vision==3.10.0
googleapis-common-protos==1.69.1
grpcio==1.71.0rc2
grpcio-status==1.71.0rc2
h11==0.14.0
html5lib==1.1
httpcore==1.0.7
httpx==0.28.1
huggingface-hub==0.29.2
humanfriendly==10.0
idna==3.10
importlib_metadata==8.5.0
Jinja2==3.1.6
jiter==0.8.2
jmespath==1.0.1
joblib==1.4.2
kiwisolver==1.4.8
langdetect==1.0.9
lxml==5.3.1
Markdown==3.7
MarkupSafe==3.0.2
marshmallow==3.26.1
matplotlib==3.10.1
mpmath==1.3.0
multidict==6.1.0
mypy-extensions==1.0.0
nest-asyncio==1.6.0
networkx==3.4.2
nltk==3.9.1
numpy==1.26.4
olefile==0.47
omegaconf==2.3.0
onnx==1.17.0
onnxruntime==1.20.1
openai==1.65.4
opencv-python==4.11.0.86
openpyxl==3.1.5
opentelemetry-api==1.30.0
opentelemetry-sdk==1.30.0
opentelemetry-semantic-conventions==0.51b0
packaging==24.2
pandas==2.2.3
pdf2image==1.17.0
pdfminer.six==20240706
pi_heif==0.21.0
pikepdf==9.5.2
pillow==11.1.0
propcache==0.3.0
proto-plus==1.26.0
protobuf==5.29.3
psutil==7.0.0
pyasn1==0.6.1
pyasn1_modules==0.4.1
pycocotools==2.0.8
pycparser==2.22
pydantic==2.10.6
pydantic_core==2.27.2
pypandoc==1.15
pyparsing==3.2.1
pypdf==5.3.1
pypdfium2==4.30.1
python-dateutil==2.9.0.post0
python-docx==1.1.2
python-dotenv==1.0.1
python-iso639==2025.2.18
python-magic==0.4.27
python-multipart==0.0.20
python-oxmsg==0.0.2
python-pptx==1.0.2
pytz==2025.1
PyYAML==6.0.2
RapidFuzz==3.12.2
regex==2024.11.6
requests==2.32.3
requests-toolbelt==1.0.0
rsa==4.9
s3fs==2025.2.0
safetensors==0.5.3
scipy==1.15.2
six==1.17.0
sniffio==1.3.1
soupsieve==2.6
sympy==1.13.1
tiktoken==0.9.0
timm==1.0.15
tokenizers==0.21.0
torch==2.6.0
torchvision==0.21.0
tqdm==4.67.1
transformers==4.49.0
typing-inspect==0.9.0
typing_extensions==4.12.2
tzdata==2025.1
unstructured==0.16.23
unstructured-client==0.30.6
unstructured-inference==0.8.9
unstructured-ingest==0.5.11
unstructured.pytesseract==0.3.15
urllib3==2.3.0
webencodings==0.5.1
wrapt==1.17.2
xlrd==2.0.1
XlsxWriter==3.2.2
yarl==1.18.3
zipp==3.21.0
zope.interface==7.2

Additional Info
If I check on the webUI the job start correctly!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions