-
Notifications
You must be signed in to change notification settings - Fork 18
Description
When trying to execute code using the PyodideSandbox in a Windows environment, the following error occurs:
OSError: [WinError 206] The filename or extension is too long
This issue appears when executing simple Python logic that processes large datasets (for example, large documentation abstracts).Below i have provides some example. Can anyone please help me out in resolving this.
the below code throws error when a huge data set passed
`model_data_list = model_output.get("SampleFunction", [])
objectid_to_name = {
func["objectId"]: func["name"]
for func in model_data_list
if "objectId" in func and "name" in func
}
objectid_to_guid = {
func["objectId"]: func["guid"]
for func in model_data_list
if "objectId" in func and "guid" in func
}
doc_list = Document_output.get("ElementInfo", [])
element_to_guid = {
func["name"]: func["guid"]
for func in doc_list
if "name" in func and "guid" in func
}
enriched_docs=[]
for raw_response in raw_responses:
try:
document= Document_output.get("Sheet1")
for doc in document:
print(doc)
if doc.get("id") == raw_response.get("element_id"):
function_guid=raw_response.get("function_guid")
enriched_doc = dict(doc) # Shallow copy
enriched_doc["Function_name"] = objectid_to_name.get(function_guid, "Unknown")
enriched_doc["Function_Guid"] = objectid_to_guid.get(function_guid , "Unknown")
enriched_doc["Element_Guid"] = element_to_guid.get(doc.get("citation") , "Unknown")
enriched_doc["Score"] = raw_response.get("Score")
enriched_doc["Reason"] = raw_response.get("Reason", "")
enriched_docs.append(enriched_doc)
break
else:
raise Exception(f"{doc.get("id")}")
except Exception as e:
print(f"Error processing response: {e} {doc}")`
Any guidance, workaround, or code example to handle large inputs safely would be greatly appreciated.