Repository navigation
Fix queenbee executable path resolution failure - #362
jamesramsden-bh wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
| sibling = Path(sys.executable).parent / "queenbee.exe" | ||
| if sibling.is_file(): | ||
| return sibling.as_posix() | ||
| return None |
There was a problem hiding this comment.
maybe this should fall back to a known valid queenbee location? Suggestion below specifies to default to known ladybug_tools standalone python install location (which is required to install LBT_TK)
| return None | |
| return r"C:\Program Files\ladybug_tools\python\Scripts\queenbee.exe" |
| honeybee.config.folders.python_scripts_path double-appends "Scripts" | ||
| when sys.executable already lives in a venv's Scripts/ folder (as is | ||
| the case for this environment), which points lbt_recipes at a | ||
| non-existent path and makes every Recipe.run() call fail with | ||
| FileNotFoundError. Resolve the real executable explicitly instead. |
There was a problem hiding this comment.
This was only true in the specific case where the folder ~/ladybug_tools/weather existed and was empty (a bug with honeybee/ladybug_tools imo). This also overwrites the case where a user might want to specify a queenbee.exe located elsewhere using the config.json file (maybe a linux server might have queenbee in /bin/queenbee?)
It might be better to directly use the honeybee.config.folders module to get the path described and check that that exists first.
|
I think this issue has now been resolved in #365 (the install method now directly writes the correct path to search for to the config json) |
Issues addressed by this PR
Closes #361
Test files
Do run_tests.bat
Changelog
Additional comments
This fix is a workaround for a known LB bug, and can potentially be wound back if/when fixed by the LB team.