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

File ('homographs.en' ) is not closed after opening by construct_homograph_dictionary #13

Open
antimora opened this issue May 25, 2020 · 0 comments

Comments

@antimora
Copy link

File ('homographs.en' ) remains open after using it. Please consider using context manager to auto close as in this example: https://book.pythontips.com/en/latest/context_managers.html

The actual warning:

  File "/home/dev/.local/lib/python3.8/site-packages/g2p_en/g2p.py", line 35, in construct_homograph_dictionary
    for line in codecs.open(f, 'r', 'utf8').read().splitlines():
ResourceWarning: unclosed file <_io.BufferedReader name='/home/dev/.local/lib/python3.8/site-packages/g2p_en/homographs.en'>

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

1 participant