-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
test failures and errors with v0.11rc1 #3363
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
Comments
Can you update to master and paste the output of |
@y-p You are to fast! I just finished the ticket and added |
I run the test suite on current master. |
updating to recent statsmodels should take care of the WLS fail (it was fixed quite a while ago, |
I can't repro the mpl failures after setting $LANG and $LC_ALL, using mpl 1.2.1. |
Seems to be a strange problem: if I call statsmodels 0.5.0.dev-1bbd4ca is the version which is installed when you run |
I've pushed an update this morning, if the test fails now it spits out an error message can't repro with test.sh either. can you post the value of |
It is UTF-8. I don't get any errors with 0.10.1 and mpl 1.2.0 or mpl 1.2.1. |
Please post a full backtrace for one of the failing mpl tests. |
I figured it out a bit more: the errors disappear if I set The full traceback of ======================================================================
ERROR: test_axis_limits (pandas.tseries.tests.test_plotting.TestTSPlot)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/.../pandas/pandas/tseries/tests/test_plotting.py", line 353, in test_axis_limits
_test(ax)
File "/.../pandas/pandas/tseries/tests/test_plotting.py", line 334, in _test
ax.get_figure().canvas.draw()
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 148, in draw
FigureCanvasAgg.draw(self)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 440, in draw
self.figure.draw(self.renderer)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/figure.py", line 1006, in draw
func(*args)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/axes.py", line 2086, in draw
a.draw(renderer)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/axis.py", line 1052, in draw
renderer)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/axis.py", line 1001, in _get_tick_bboxes
extent = tick.label1.get_window_extent(renderer)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/text.py", line 752, in get_window_extent
bbox, info = self._get_layout(self._renderer)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/text.py", line 309, in _get_layout
clean_line, ismath = self.is_math_text(line)
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/text.py", line 994, in is_math_text
if cbook.is_math_text(s):
File "/.../.virtualenvs/myenv/local/lib/python2.7/site-packages/matplotlib/cbook.py", line 1797, in is_math_text
"matplotlib display text must have all code points < 128 or use "
ValueError: matplotlib display text must have all code points < 128 or use Unicode strings and for the other tests it is ======================================================================
ERROR: test_line_plot_datetime_frame (pandas.tseries.tests.test_plotting.TestTSPlot)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/.../pandas/pandas/tseries/tests/test_plotting.py", line 175, in test_line_plot_datetime_frame
_check_plot_works(df.plot, freq)
File "/.../pandas/pandas/tseries/tests/test_plotting.py", line 988, in _check_plot_works
plt.savefig(path)
File "/.../python2.7/site-packages/matplotlib/pyplot.py", line 472, in savefig
return fig.savefig(*args, **kwargs)
File "/.../python2.7/site-packages/matplotlib/figure.py", line 1370, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/.../python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 161, in print_figure
FigureCanvasAgg.print_figure(self, *args, **kwargs)
File "/.../python2.7/site-packages/matplotlib/backend_bases.py", line 2096, in print_figure
**kwargs)
File "/.../python2.7/site-packages/matplotlib/backends/backend_agg.py", line 492, in print_png
FigureCanvasAgg.draw(self)
File "/.../python2.7/site-packages/matplotlib/backends/backend_agg.py", line 440, in draw
self.figure.draw(self.renderer)
File "/.../python2.7/site-packages/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/.../python2.7/site-packages/matplotlib/figure.py", line 1006, in draw
func(*args)
File "/.../python2.7/site-packages/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/.../python2.7/site-packages/matplotlib/axes.py", line 2086, in draw
a.draw(renderer)
File "/.../python2.7/site-packages/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/.../python2.7/site-packages/matplotlib/axis.py", line 1052, in draw
renderer)
File "/.../python2.7/site-packages/matplotlib/axis.py", line 1001, in _get_tick_bboxes
extent = tick.label1.get_window_extent(renderer)
File "/.../python2.7/site-packages/matplotlib/text.py", line 752, in get_window_extent
bbox, info = self._get_layout(self._renderer)
File "/.../python2.7/site-packages/matplotlib/text.py", line 309, in _get_layout
clean_line, ismath = self.is_math_text(line)
File "/.../python2.7/site-packages/matplotlib/text.py", line 994, in is_math_text
if cbook.is_math_text(s):
File "/.../python2.7/site-packages/matplotlib/cbook.py", line 1797, in is_math_text
"matplotlib display text must have all code points < 128 or use "
ValueError: matplotlib display text must have all code points < 128 or use Unicode strings (the difference is only in the first lines, the error occurs in |
I cannot reproduce the behaviour in this comment: >>> import sys
>>> sys.getdefaultencoding()
'ascii'
>>> import matplotlib.pyplot as plt
>>> sys.getdefaultencoding()
'ascii'
>>> import matplotlib as mpl
>>> mpl.__version__
'1.2.1'
|
That's with Qt4Agg as the backend in .mplrc? |
Yes |
I can't replicate with backend = Qt4Agg in my .mplrc can you break in with pdb ( Also, just crudely, does it go away if you place the backend init code Put the following in /pandas/tools/tests/init.py
|
Seems that the problem is, that the xlables are of type string, not unicode. They are unicode if I use In [64]: ser = tm.makeTimeSeries()
In [65]: fig, ax = plt.subplots()
In [66]: ax.plot_date(ser.index, ser)
Out[66]: [<matplotlib.lines.Line2D at 0x57c1090>]
In [67]: xlabels = ax.get_xmajorticklabels()
In [68]: for label in xlabels:
print type(label.get_text())
....:
<type 'unicode'>
<type 'unicode'>
<type 'unicode'>
<type 'unicode'>
<type 'unicode'>
<type 'unicode'>
In [69]: plt.close()
In [70]: ax = ser.plot()
In [71]: xlabels = ax.get_xmajorticklabels()
In [72]: for label in xlabels:
print type(label.get_text())
....:
<type 'str'>
<type 'str'>
<type 'str'> |
This is a simple example: if I run it with In [1]: idx = pd.date_range('2013-01-01', '2013-04-30')
In [2]: s = pd.Series(np.random.rand(idx.size), index=idx)
In [3]: s.plot()
Out[3]: <matplotlib.axes.AxesSubplot at 0x338c510>
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_qt4.py", line 366, in idle_draw
self.draw()
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_qt4agg.py", line 148, in draw
FigureCanvasAgg.draw(self)
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line 440, in draw
self.figure.draw(self.renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1006, in draw
func(*args)
File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 2086, in draw
a.draw(renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 54, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1052, in draw
renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1001, in _get_tick_bboxes
extent = tick.label1.get_window_extent(renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 752, in get_window_extent
bbox, info = self._get_layout(self._renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 309, in _get_layout
clean_line, ismath = self.is_math_text(line)
File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 994, in is_math_text
if cbook.is_math_text(s):
File "/usr/lib/pymodules/python2.7/matplotlib/cbook.py", line 1797, in is_math_text
"matplotlib display text must have all code points < 128 or use "
ValueError: matplotlib display text must have all code points < 128 or use Unicode strings So I don't think it is the test setup. Can you reproduce this? |
yep. That repros here. good. |
well, it does fail (silently) in qtconsole, but not in the terminal. so maybe it repros. |
Do the labels contain non-ascii when you usually run? is february a 16 letter word with 3 umlauts |
March is a month with an umlaut (März). |
Seems that if pandas.tseries.plotting.TimeSeries_DateFormatter is called a Period.strftime(...) is returned. So Period.strftime doesn't returnes unicode. |
if I change line 973 in tseries.plotting to |
Good, close enough. I think you mean tseries.converter though. |
yes tseries.converter, sorry. |
Ok, looks like ultimately the date formatting gets done in a c routine, I'll see if I can put this together later on today. Good job tracking it down. 👍 |
can you give #3410 a whirl? I was able to repro everything you noted, and that fixes it for me. |
I works! really good job removing the errors 👍 |
Merged. Thanks for reporting and all the subsequent digging, you |
I get one failure and 7 errors when I run the test suite on v0.11rc1.
This is the traceback of the error:
For
test_axis_limits
,test_line_plot_datetime_frame
,test_line_plot_datetime_series
,test_line_plot_inferred_freq
,test_line_plot_period_frame
,test_line_plot_period_series
andtest_tsplot
I get aValueError
:The reason for the errors seems to be my language setting, which is
de_DE.UTF-8
. I never got these errors in the pandas test suite before so maybe they are also related to the recent update to matplotlib 1.2.1.The text was updated successfully, but these errors were encountered: