Beautiful soup + html5lib - AttributeError: 'NoneType' object has no attribute 'next_element'
Bug #1800710 reported by
Guy King
This bug report is a duplicate of:
Bug #1806598: Crash on <!----> comment using html5lib.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
New
|
Undecided
|
Unassigned |
Bug Description
https:/
run in conda environment -
channels:
- defaults
- conda-forge
dependencies:
- beautifulsoup4=
- flake8=3.5.0
- flake8-
- geopy=1.17.0
- html5lib=1.0.1
- ipython=7.0.1
- requests=2.19.1
- pymongo=3.7.1
- pyquery=1.3.0
- pytest=3.7.4
- python-
- pytz=2018.4
- pip=9.0.1
- pip:
- flake8-commas
- requests_
- scrapy-
- fuzzywuzzy==0.17.0
- python-
- python=3.6.2
- Scrapy=1.5.0
Related branches
lp:~facelessuser/beautifulsoup/next_previous_fixes
- Leonard Richardson: Approve
-
Diff: 234 lines (+75/-22)4 files modifiedbs4/__init__.py (+23/-10)
bs4/builder/_html5lib.py (+5/-5)
bs4/element.py (+7/-7)
bs4/tests/test_html5lib.py (+40/-0)
To post a comment you must log in.
Digging through the example on the GitHub link, it appears the problematic source had the `<!---->` in the source. This is related to issue #1806598 which I just looked into. I believe I understand this problem and have a suitable fix for this. I plan on creating a merge request to handle this.