Skip to content

TypeError calling Traversable.read_text() via importlib.resources #127340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zooba opened this issue Nov 27, 2024 · 1 comment
Closed

TypeError calling Traversable.read_text() via importlib.resources #127340

zooba opened this issue Nov 27, 2024 · 1 comment
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes topic-importlib type-bug An unexpected behavior, bug, or error

Comments

@zooba
Copy link
Member

zooba commented Nov 27, 2024

Bug report

importlib.resources.abc.Traversable.read_text has a signature that only takes an encoding parameter.

importlib.resources._functional.read_text calls it passing errors.

This, unsurprisingly, causes a TypeError. My exact error message is Traversable.read_text() got an unexpected keyword argument 'errors', but I believe it's an instance of CompatibilityFiles.SpecPath (as I've never bothered updating this code for the structural changes).

(Ping @jaraco)

@zooba zooba added type-bug An unexpected behavior, bug, or error topic-importlib 3.13 bugs and security fixes 3.14 bugs and security fixes labels Nov 27, 2024
@FFY00
Copy link
Member

FFY00 commented Nov 27, 2024

Duplicate of GH-127012 😃

@FFY00 FFY00 closed this as completed Nov 27, 2024
@Eclips4 Eclips4 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes topic-importlib type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants