Issues with embedded python path

Hi to All,

I have a workflow who execute a python code.
I invoked an IA Model with this code
base_options = python.BaseOptions(model_asset_path=‘pose_landmarker_heavy.task’)

It works fine.

But when i execute another workflow and re execute my precedent worklow it crashes

Unable to open file at C:\Users\User\AppData\Local\python-3.11.0-embed-amd64/C:\Users\User\AppData\Local\python-3.11.0-embed-amd64\pose_landmarker_heavy.task, errno=22

it seems that OpenRPA duplicate concaténation embeddeb path.

Please Help.

try setting model_asset_path to the full path and filename, and not just the filename
( either ./pose_landmarker_heavy.task or C:\Users\User\AppData\Local\python-3.11.0-embed-amd64/pose_landmarker_heavy.task )

Thank you for your help .

I tried to set the fuul path but the same error persist.

I think it’s a google MediaPipe issue

I taked a look on mediapipe github and i find this :slight_smile:

I find a workaround for this
If you want to load a model you must use a buffer instead to call a model path like this

with open(r’C:\Users\User\AppData\Local\python-3.11.0-embed-amd64\pose_landmarker_heavy.task’, ‘rb’) as file:
model_data = file.read()

base_options=python.BaseOptions(model_asset_buffer=model_data)

1 Like

Thank you for sharing the solution.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.