Maplemx / Agently

[AI Agent Application Development Framework] - 🚀 Build AI agent native application in very few code 💬 Easy to interact with AI agent in code using structure data and chained-calls syntax 🧩 Enhance AI Agent using plugins instead of rebuild a whole new agent
http://agently.tech
Apache License 2.0
1.07k stars 122 forks source link

Error report when packaging by pyinstaller #123

Open belike2333 opened 3 months ago

belike2333 commented 3 months ago

it reports error when i use pyinstaller to package the codes into xxx.exe.

the error is about the agently framework can not find 'plugins' in the temp runtime folder.

it's quite wired as the .spec file is normal and i can use pyinstaller to package the codes without agently.

does anyone have the similar problem ? call for help, thx a millon!

Maplemx commented 3 months ago

It seems this error caused by dynamic loading design of Agently framework.

After Agently is packaged into an exe file, the exe file try to dynamic load the plugin modules from the path where the exe file is and can not find any, so there's an error report.

Maybe try to add plugins dir path to exe file when using pyinstaller to package?

pyinstaller --add-data "path/to/Agently/plugins;Agently/plugins" your_script.py

belike2333 commented 2 months ago

It seems this error caused by dynamic loading design of Agently framework.

After Agently is packaged into an exe file, the exe file try to dynamic load the plugin modules from the path where the exe file is and can not find any, so there's an error report.

Maybe try to add plugins dir path to exe file when using pyinstaller to package?

pyinstaller --add-data "path/to/Agently/plugins;Agently/plugins" your_script.py

not work, = =b