fix: ImportError on pipecat-ai >= 1.8 (_NotGiven moved to pipecat.utils.types) - #1
Open
Rehansanjay wants to merge 1 commit into
Open
Rehansanjay wants to merge 1 commit into
Rehansanjay wants to merge 1 commit into
Conversation
pipecat 1.8 moved the settings sentinel type out of pipecat.services.settings (`_NotGiven`) into pipecat.utils.types (`NotGiven`), so the plugin raised ImportError on import with any pipecat-ai 1.8 or newer. Import it from pipecat.utils.types and fall back to the old name for older pipecat.
This branch has not been deployed
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.
Installing the plugin today gives a package that can't be imported. The
pipecat-aidependency resolves to the latest Pipecat (1.11.0), and since pipecat-ai 1.8.0 the import fails:pipecat-ai 1.8 moved the settings sentinel into
pipecat.utils.types(d262a31a6, "share one NOT_GIVEN sentinel across Pipecat"), and the private_NotGivenbecameNotGiven.Change:
image.pyimportsNotGivenfrompipecat.utils.typesand falls back to the old name on older pipecat, so the plugin works on both sides of the move. The settings annotations are unchanged. I also added a line toCHANGELOG.md.Checked with the repo's test suite (
pytest, with thedevgroup'spytest-aiohttp):mainImportError)Found by a nightly check that installs every community plugin listed in Pipecat's docs against the latest release: https://github.com/Rehansanjay/pipecat-plugin-health