-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
ASV: occasional asv failures on xlwt #19779
Comments
from
I think the |
If it is defined in the setup function (as it is now), it should be available in the benchmark function. It would be strange that this solves it. |
its passing 1 our of n times: https://travis-ci.org/pandas-dev/pandas-ci/jobs/345996588 |
cc @mroeschke @WillAyd if you have any ideas |
Perhaps we should be explicitly closing the |
Looks to be specifically a problem with the
Digging into
Looks like |
its funny because it has worked at times. really odd. |
While it doesn't explain why this is happening I think if we add Line 390 in 74dbfd0
|
can u replicate this in a test? (and then fix)? |
Hi all, I'm completely new to pandas development and I've just prepared a working environment following the guide Contributing to pandas, because I wanted to contribute to some other issue. So I'm not fully sure whether this is the right place in order to address the following test failure, but for me it seems to be related to #19926: When running the tests for pytest pandas/tests/io/test_excel.py it comes up with three failures (because of 3 parameters) for the test method
It seems like the HTTPResponse object returned by This fixes the tests for me: @@ -10,6 +10,7 @@ import os
import abc
import warnings
import numpy as np
+from http.client import HTTPResponse
from pandas.core.dtypes.common import (
is_integer, is_float,
@@ -387,7 +388,9 @@ class ExcelFile(object):
self.book = io
elif not isinstance(io, xlrd.Book) and hasattr(io, "read"):
# N.B. xlrd.Book has a read attribute too
- if hasattr(io, 'seek'):
+ #
+ # http.client.HTTPResponse.seek() -> UnsupportedOperation exception
+ if not isinstance(io, HTTPResponse) and hasattr(io, 'seek'):
# GH 19779
io.seek(0) Should I create a pull request here or a new issue or do I miss something in my setup such that the tests can't run? My currently installed versions are:
|
@mcrot I would suggest that you open a new issue for that and then submit a PR referencing the issue |
Closes pandas-dev#20434. Back in pandas-dev#19779 a call of a seek() method was added. This call fails on HTTPResponse instances with an UnsupportedOperation exception, so for this case a try..except wrapper was added here.
Closes pandas-dev#20434. Back in pandas-dev#19779 a call of a seek() method was added. This call fails on HTTPResponse instances with an UnsupportedOperation exception, so for this case a try..except wrapper was added here.
Closes pandas-dev#20434. Back in pandas-dev#19779 a call of a seek() method was added. This call fails on HTTPResponse instances with an UnsupportedOperation exception, so for this case a try..except wrapper was added here.
https://travis-ci.org/pandas-dev/pandas-ci/jobs/343616367
this is on current pandas master (this is just the CI job running it).
excel asv's
I have seen this work as well. maybe a race-condition?
The text was updated successfully, but these errors were encountered: