Skip to content

Unable to extract entities from image #1351

@praveshkumar1988

Description

@praveshkumar1988

allowedNodes":"", "allowedRelationship":"", "api_name":"extract", "database":"neo4j", "db_url":"neo4j+s://f8b34f14.databases.neo4j.io:7687", "email":null, "error_message":"str returned non-string (type NoneType)", "failed_count":1, "file_created_at":"2025-07-30 07:57:23 ", "file_name":"images.jpeg", "logging_time":"2025-07-30 07:57:45 UTC", "message":"Failed To Process File:images.jpeg or LLM Unable To Parse Content ", "source_type":"local file", "source_url":null, "status":"Failed", "userName":"neo4j", "wiki_query":null}

ERROR 2025-07-30T07:57:45.272859Z Traceback (most recent call last): File "/code/score.py", line 244, in extract_knowledge_graph_from_file uri_latency, result = await extract_graph_from_file_local_file(uri, userName, password, database, model, merged_file_path, file_name, allowedNodes, allowedRelationship, token_chunk_size, chunk_overlap, chunks_to_combine, retry_condition, additional_instructions) File "/code/src/main.py", line 237, in extract_graph_from_file_local_file file_name, pages = get_documents_from_gcs( PROJECT_ID, BUCKET_UPLOAD, folder_name, fileName) File "/code/src/document_sources/gcs_bucket.py", line 68, in get_documents_from_gcs pages = loader.load() File "/usr/local/lib/python3.10/site-packages/langchain_community/document_loaders/gcs_file.py", line 83, in load docs = loader.load() File "/usr/local/lib/python3.10/site-packages/langchain_core/document_loaders/base.py", line 32, in load return list(self.lazy_load()) File "/usr/local/lib/python3.10/site-packages/langchain_community/document_loaders/unstructured.py", line 120, in lazy_load yield Document(page_content=str(element), metadata=metadata) TypeError: str returned non-string (type NoneType)
{
"textPayload": "Traceback (most recent call last):\n File "/code/score.py", line 244, in extract_knowledge_graph_from_file\n uri_latency, result = await extract_graph_from_file_local_file(uri, userName, password, database, model, merged_file_path, file_name, allowedNodes, allowedRelationship, token_chunk_size, chunk_overlap, chunks_to_combine, retry_condition, additional_instructions)\n File "/code/src/main.py", line 237, in extract_graph_from_file_local_file\n file_name, pages = get_documents_from_gcs( PROJECT_ID, BUCKET_UPLOAD, folder_name, fileName)\n File "/code/src/document_sources/gcs_bucket.py", line 68, in get_documents_from_gcs\n pages = loader.load()\n File "/usr/local/lib/python3.10/site-packages/langchain_community/document_loaders/gcs_file.py", line 83, in load\n docs = loader.load()\n File "/usr/local/lib/python3.10/site-packages/langchain_core/document_loaders/base.py", line 32, in load\n return list(self.lazy_load())\n File "/usr/local/lib/python3.10/site-packages/langchain_community/document_loaders/unstructured.py", line 120, in lazy_load\n yield Document(page_content=str(element), metadata=metadata)\nTypeError: str returned non-string (type NoneType)",
"insertId": "6889d079000429dbb51f8be7",
"resource": {
"type": "cloud_run_revision",
"labels": {
"revision_name": "prodprocessing-backend-00056-k99",
"configuration_name": "prodprocessing-backend",
"location": "us-central1",
"service_name": "prodprocessing-backend",
"project_id": "llm-experiments-387609"
}
},
"timestamp": "2025-07-30T07:57:45.272859Z",
"severity": "ERROR",
"labels": {
"instanceId": "0069c7a988420f11deb75e87279439ac8a503e89ead633a50fb5a5a46dd64151652f54e8942a5aad9f8ddc5228fa0aa1e0499dafba06b38c1a787a5ff27913c10154574b8936c15ee5afe406477048"
},
"logName": "projects/llm-experiments-387609/logs/run.googleapis.com%2Fstderr",
"receiveTimestamp": "2025-07-30T07:57:45.527467921Z",
"errorGroups": [
{
"id": "CJ-e-53U55LizQE"
}
]
}

Metadata

Metadata

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