Skip to content

BLD: test_to_html_compat: AttributeError: 'NoneType' object has no attribute 'next_element' #4212

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
yarikoptic opened this issue Jul 11, 2013 · 2 comments
Labels
Testing pandas testing functions or related to the test suite
Milestone

Comments

@yarikoptic
Copy link
Contributor

Trying current master build on Debian sid with

$> welp bs4
PATH       : /usr/lib/python2.7/dist-packages/bs4/__init__.pyc
SRC PATH   : /usr/share/pyshared/bs4/__init__.py
VERSION    : Not found
__version__: '4.2.0'
PACKAGE    : python-bs4
ii  python-bs4                                                  4.2.0-2                                    all          error-tolerant HTML parser for Python
python-bs4:
  Installed: 4.2.0-2
  Candidate: 4.2.0-2
  Version table:
 *** 4.2.0-2 0
        900 http://debian.lcs.mit.edu/debian/ jessie/main amd64 Packages
        600 http://debian.lcs.mit.edu/debian/ sid/main amd64 Packages
        100 /var/lib/dpkg/status
     4.1.0-1 0
        100 http://debian.lcs.mit.edu/debian/ wheezy/main amd64 Packages

test crashes

======================================================================
ERROR: test_to_html_compat (pandas.io.tests.test_html.TestReadHtmlBase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/io/tests/test_html.py", line 88, in test_to_html_compat
    index_col=0)[0]
  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/io/tests/test_html.py", line 67, in run_read_html
    return read_html(*args, **kwargs)
  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/io/html.py", line 900, in read_html
    attrs)
  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/io/html.py", line 772, in _parse
    for table in tables]
  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/io/html.py", line 186, in <genexpr>
    return (self._build_table(table) for table in tables)
  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/io/html.py", line 345, in _build_table
    body = self._parse_raw_tbody(table)
  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/io/html.py", line 367, in _parse_raw_tbody
    res = self._parse_tr(tbody[0])
  File "/home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.11.0+git43-g7b2eaa4/debian/tmp/usr/lib/python2.7/dist-packages/pandas/io/html.py", line 399, in _parse_tr
    return element.find_all('tr')
  File "/usr/lib/python2.7/dist-packages/bs4/element.py", line 1167, in find_all
    return self._find_all(name, attrs, text, limit, generator, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bs4/element.py", line 485, in _find_all
    return [element for element in generator
  File "/usr/lib/python2.7/dist-packages/bs4/element.py", line 1185, in descendants
    current = current.next_element
AttributeError: 'NoneType' object has no attribute 'next_element'
@cpcloud
Copy link
Member

cpcloud commented Jul 13, 2013

@yarikoptic does installing a proper version of bs4 fix this?

@ghost ghost assigned cpcloud Jul 13, 2013
@cpcloud
Copy link
Member

cpcloud commented Jul 16, 2013

this should be resolved by #4257

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

2 participants