-
Notifications
You must be signed in to change notification settings - Fork 9
[Bug]: SkillLoader relative paths break when package is installed via pip #13
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingcore frameworkChanges to loader, env, or base classes.Changes to loader, env, or base classes.
Description
Affected Component
Core Framework (Loader/Env)
Skill Name (if applicable)
n/a
Bug Description
When skillware is installed into a virtual environment's site-packages via pip, the relative path calculation in loader.py fails to locate a user's local skills/ directory if they are working in a completely separate project. It instead looks for the skills folder inside the site-packages/skillware/... path.
We need it to respect os.getcwd() or read from an environment variable (e.g., SKILLWARE_SKILL_PATH) before falling back.
Steps to Reproduce
pip install skillware- Create a local
skills/folder containing a valid skill in a completely new directory. - Write a script in that directory attempting to load the skill using a relative path:
SkillLoader.load_skill("my_local_skill"). - Observe a
FileNotFoundErroras the loader attempts to look inside thesite-packages/skillwaredirectory instead of your local project.
Error Logs
FileNotFoundError: Skill not found at /path/to/venv/lib/site-packages/skillware/core/../../skills/my_local_skillEnvironment
- OS: Any OS
- Python Version: 3.11+
- Skillware Version: Current
mainbranch
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcore frameworkChanges to loader, env, or base classes.Changes to loader, env, or base classes.