-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: TypeError exception when using read_html with extract_links='all' argument #48316
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
3 tasks done
Comments
This patch fixes your example locally
We would need a minimal raw html example (without connecting to the internet) to add a unit test for this case |
Seems to me that minimal example like below:
Gives:
|
3 tasks
Thanks for the minimal example. Opened up a pull request to fix in #48334 so should be fixed when 1.5 is officially released. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
When
extract_links='all'
set topd.read_html
,TypeError: 'int' object is not subscriptable
is raised. Withoutextract_links
argument, table is parsed correctly, but no links are present.Stacktrace:
Applies to 1.5.0rc0 and main pandas versions on Python 3.8.
Expected Behavior
No exception raised. Links are parsed and added to dataframe.
Installed Versions
INSTALLED VERSIONS
commit : 1843cf2
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.10.102.1-microsoft-standard-WSL2
Version : #1 SMP Wed Mar 2 00:30:59 UTC 2022
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.6.0.dev0+29.g1843cf23c7
numpy : 1.23.2
pytz : 2022.2.1
dateutil : 2.8.2
setuptools : 44.0.0
pip : 20.0.2
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.1
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : 4.11.1
bottleneck : None
brotli : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None
tzdata : None
The text was updated successfully, but these errors were encountered: