Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions pandas/io/excel/_base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import abc
from collections import OrderedDict
from datetime import date, datetime, timedelta
from io import BytesIO
from io import BytesIO, UnsupportedOperation
import os
from textwrap import fill

Expand Down Expand Up @@ -347,7 +347,12 @@ def __init__(self, filepath_or_buffer):
self.book = filepath_or_buffer
elif hasattr(filepath_or_buffer, "read"):
# N.B. xlrd.Book has a read attribute too
filepath_or_buffer.seek(0)
try:
filepath_or_buffer.seek(0)
except UnsupportedOperation:
# HTTPResponse does not support seek()
# GH 28825
pass
self.book = self.load_workbook(filepath_or_buffer)
elif isinstance(filepath_or_buffer, str):
self.book = self.load_workbook(filepath_or_buffer)
Expand Down