Skip to content

UnsupportedOperation 'seek' when loading excel files from urllib3.response.HTTPResponse object #28825

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
onsimon opened this issue Oct 7, 2019 · 1 comment
Labels
IO Excel read_excel, to_excel Regression Functionality that used to work in a prior pandas version

Comments

@onsimon
Copy link

onsimon commented Oct 7, 2019

0.25.1 seems to have reintroduced #20434

Update: not the case, but the same problem happens when feeding excel_read() with an urllib3.response.HTTPResponse object. Code sample updated.

Code Sample, a copy-pastable example if possible

import pandas
import requests

url = "https://raw.github.com/pandas-dev/pandas/master/pandas/tests/io/data/test1.xls"
r = requests.get(url, stream=True)
df = pandas.read_excel(r.raw)
print(df)

Problem description

Using 0.25.1 I get the same problem and output as described in #20434 with the code above.

Expected Output

See #20434

Output of pd.show_versions()

INSTALLED VERSIONS

commit : None

pandas : 0.25.1
numpy : 1.17.2
pytz : 2019.3
dateutil : 2.8.0
pip : 19.2.3
setuptools : 41.4.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
xarray : None
xlrd : 1.2.0
xlwt : None
xlsxwriter : None

@simonjayhawkins simonjayhawkins added IO Excel read_excel, to_excel Regression Functionality that used to work in a prior pandas version labels Oct 7, 2019
@onsimon onsimon changed the title UnsupportedOperation 'seek' when loading excel files from url UnsupportedOperation 'seek' when loading excel files from urllib3.response.HTTPObject Oct 8, 2019
@onsimon onsimon changed the title UnsupportedOperation 'seek' when loading excel files from urllib3.response.HTTPObject UnsupportedOperation 'seek' when loading excel files from urllib3.response.HTTPResponse object Oct 8, 2019
@onsimon
Copy link
Author

onsimon commented Oct 18, 2019

Closing since this will be addressed with #28874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Excel read_excel, to_excel Regression Functionality that used to work in a prior pandas version
Projects
None yet
2 participants