Skip to content
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

ResourceWarning: unclosed file #66

Closed
gregorias opened this issue Jul 28, 2024 · 1 comment
Closed

ResourceWarning: unclosed file #66

gregorias opened this issue Jul 28, 2024 · 1 comment

Comments

@gregorias
Copy link

Since 1795d65#diff-c99bbcfc0e7112a9ae7a56a9af9b33a1b503dafc3bbdaf6f2a753bd62fd2a6e4R122, Pyphen opens a dictionary without properly closing it at

encoding = path.open('rb').readline().decode()
.

This results in a resource warning:

/Users/grzesiek/Code/anki/anki-word-hyphenator/deps/Pyphen/pyphen/__init__.py:118: ResourceWarning: unclosed file <_io.BufferedReader name='/Users/grzesiek/Code/anki/anki-word-hyphenator/deps/Pyphen/pyphen/dictionaries/hyph_en_US.dic'>
  encoding = path.open('rb').readline().decode()
@liZe
Copy link
Member

liZe commented Jul 29, 2024

Thanks for the report!

@liZe liZe closed this as completed in 6f3f769 Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants