-
Notifications
You must be signed in to change notification settings - Fork 243
Getting ResourceWarning: unclosed file open(csspath) #246
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
Comments
Mind sharing some details about your environment? @wanam OS Also, could you provide a sample css-file that causes the error? Thanks! |
OS: Ubuntu 18.04.3 LTS
Concerning the asset, you can reproduce the issue with the default asset: https://github.com/pytest-dev/pytest-html/blob/master/pytest_html/resources/style.css |
Have had the same warning appear on Windows. OS: Windows 10.0.18362 Build 18362 It does indeed seem, to me, like a redundant or leftover step in the |
I believe this will be solved when #235 is merged. |
I'm terribly sorry, I thought I had merged #235 already! @wanam @janvanoverwalle Do you mind trying the patch (it's on If it does, I'll release a new version instantly! |
Tested the patch, and it seems fixed, thanks @krzysztof-pawlik-gat ! |
Appears fixed from my end as well. Thanks! |
Awesome! Thank you everyone! 🙏 |
I'm getting bellow error while loading a custom css file:
ResourceWarning: unclosed file <_io.TextIOWrapper name='assets/style.css' mode='r' encoding='UTF-8'>open(csspath)
The bug is similar to pytest-dev/pytest#4355
I'm wondering if this code block is just a leftover, because I think the custom css file is loaded here.
The text was updated successfully, but these errors were encountered: