Skip to content

CI: ResourceWarning in pandas/tests/io/test_html.py #36467

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
fangchenli opened this issue Sep 19, 2020 · 1 comment
Closed

CI: ResourceWarning in pandas/tests/io/test_html.py #36467

fangchenli opened this issue Sep 19, 2020 · 1 comment
Labels
CI Continuous Integration IO HTML read_html, to_html, Styler.apply, Styler.applymap Testing pandas testing functions or related to the test suite
Milestone

Comments

@fangchenli
Copy link
Member

It occurs occasionally on the travis-37-cov build.

_____________ TestReadHtml.test_banklist_url_positional_match[bs4] _____________

[gw0] linux -- Python 3.7.8 /home/travis/miniconda3/envs/pandas-dev/bin/python

self = <pandas.tests.io.test_html.TestReadHtml object at 0x7f40f8fef450>

    @tm.network

    def test_banklist_url_positional_match(self):

        url = "http://www.fdic.gov/bank/individual/failed/banklist.html"

        # Passing match argument as positional should cause a FutureWarning.

        with tm.assert_produces_warning(FutureWarning):

            df1 = self.read_html(

>               url, "First Federal Bank of Florida", attrs={"id": "table"}

            )

pandas/tests/io/test_html.py:130: 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <contextlib._GeneratorContextManager object at 0x7f40f9070190>

type = None, value = None, traceback = None

    def __exit__(self, type, value, traceback):

        if type is None:

            try:

>               next(self.gen)

E               AssertionError: Caused unexpected warning(s): [('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=18, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.43', 54722), raddr=('172.217.204.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/html5lib/_utils.py', 85), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.43', 54720), raddr=('172.217.204.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/html5lib/_utils.py', 85), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=21, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.43', 52284), raddr=('142.250.97.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/html5lib/_utils.py', 85), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=23, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.43', 54628), raddr=('173.194.210.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/html5lib/_utils.py', 85), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.43', 37618), raddr=('173.194.215.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/html5lib/_utils.py', 85), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=24, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.43', 38812), raddr=('173.194.217.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/html5lib/_utils.py', 85), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=28, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.43', 38824), raddr=('173.194.217.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/html5lib/_utils.py', 85), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=27, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.43', 54640), raddr=('173.194.210.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/html5lib/_utils.py', 85)]

../../../miniconda3/envs/pandas-dev/lib/python3.7/contextlib.py:119: AssertionError
@fangchenli fangchenli added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 19, 2020
fangchenli added a commit to fangchenli/pandas that referenced this issue Sep 19, 2020
@simonjayhawkins simonjayhawkins added CI Continuous Integration IO HTML read_html, to_html, Styler.apply, Styler.applymap Testing pandas testing functions or related to the test suite and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 19, 2020
fangchenli added a commit to fangchenli/pandas that referenced this issue Sep 24, 2020
@jorisvandenbossche
Copy link
Member

This might be fixed by #37786 . At least Travis was green twice on the PR ;)
Closing this now, but we can reopen if it comes up again over the coming days on CI

@jorisvandenbossche jorisvandenbossche added this to the 1.2 milestone Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration IO HTML read_html, to_html, Styler.apply, Styler.applymap Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

3 participants