Fix a crash when the data root is set via LILBEE_DATA_ROOT#554
Closed
tobocop2 wants to merge 1 commit into
Closed
Conversation
Setting the data root through the LILBEE_DATA_ROOT environment variable delivered it to the config resolver as a raw string, and deriving the documents/data/lancedb child directories with the / operator then raised TypeError: unsupported operand type(s) for /: 'str' and 'str'. Coerce the value to Path up front so the env var works the same as every other way of setting the data root.
tobocop2
marked this pull request as draft
July 18, 2026 04:55
Owner
Author
|
Superseded by the consolidated retrieval PR #557 — review and merge there. Converted to draft to keep it off the review queue; the branch and history stay intact for reference. |
Owner
Author
|
Superseded by the consolidated retrieval PR #557, which contains this change. Closing; the branch stays intact for reference. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Setting the data root through the
LILBEE_DATA_ROOTenvironment variable crashes at startup. The variable maps straight onto thedata_rootfield as a string, and the config resolver then derives the documents, data, and lancedb directories from it with the/operator, which raisesTypeError: unsupported operand type(s) for /: 'str' and 'str'. Every other way of setting the data root passes aPath, so this path was the only one that broke.Solution
Coerce
data_rootto aPathbefore deriving the child directories, and write the coerced value back so the field is consistently aPath. Coercing an existingPathis a no-op, so nothing else changes. Added a regression test that setsLILBEE_DATA_ROOTand asserts the child paths resolve without raising.