Plotting None value with dates goes in "maximum recursion depth exceeded"?

Hello,
I got a script (attached, even if without the datafile has less
meaning) that parses a log file and plots 3 datasets. With 0.98.5.3 I
got this error

$ ./ddc_graph.py
Traceback (most recent call last):
  File "./ddc_graph.py", line 39, in <module>
    rc_plot = ax.plot_date(DATES, RC, '-')
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
3356, in plot_date
    ret = self.plot(x, y, fmt, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 3288, in plot
    for line in self._get_lines(*args, **kwargs):
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
401, in _grab_next_args
    for seg in self._plot_3_args(remaining, **kwargs):
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
340, in _plot_3_args
    x, y, multicol = self._xy_from_xy(x, y)
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
215, in _xy_from_xy
    by = self.axes.yaxis.update_units(y)
  File "/usr/lib/python2.5/site-packages/matplotlib/axis.py", line
939, in update_units
    converter = munits.registry.get_converter(data)
  File "/usr/lib/python2.5/site-packages/matplotlib/units.py", line
137, in get_converter
    converter = self.get_converter( thisx )
...
  File "/usr/lib/python2.5/site-packages/matplotlib/units.py", line
137, in get_converter
    converter = self.get_converter( thisx )
  File "/usr/lib/python2.5/site-packages/matplotlib/units.py", line
130, in get_converter
    if converter is None and iterable(x):
RuntimeError: maximum recursion depth exceeded

I see the same behavior in .2 but not in 0.98.5. I remembered I've
copied this from an example in mpl doc, but that's all.

Is that a regression or something wrong in the code?

Thanks,

ddc_graph.py (1.7 KB)

···

--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

It looks like your script is trying to plot a list of a strings (which contains numbers). I checked in a fix for this on the trunk but I didn’t bother on the branch since I figured it wasn’t really supported behavior. Try converting the strings to numbers and you should be fine.

Ryan

···

On Wed, Feb 11, 2009 at 12:56 PM, Sandro Tosi <morph@…10…> wrote:

Hello,

I got a script (attached, even if without the datafile has less

meaning) that parses a log file and plots 3 datasets. With 0.98.5.3 I

got this error

RuntimeError: maximum recursion depth exceeded

I see the same behavior in .2 but not in 0.98.5. I remembered I’ve

copied this from an example in mpl doc, but that’s all.

Is that a regression or something wrong in the code?


Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Indeed: adding int(res.group...) works fine, just nice how it worked
on 0.98.5 and not on .2 .3 :slight_smile:

Thanks a lot,

···

On Wed, Feb 11, 2009 at 20:13, Ryan May <rmay31@...287...> wrote:

On Wed, Feb 11, 2009 at 12:56 PM, Sandro Tosi <morph@...10...> wrote:

Hello,
I got a script (attached, even if without the datafile has less
meaning) that parses a log file and plots 3 datasets. With 0.98.5.3 I
got this error
RuntimeError: maximum recursion depth exceeded

I see the same behavior in .2 but not in 0.98.5. I remembered I've
copied this from an example in mpl doc, but that's all.

Is that a regression or something wrong in the code?

It looks like your script is trying to plot a list of a strings (which
contains numbers). I checked in a fix for this on the trunk but I didn't
bother on the branch since I figured it wasn't really supported behavior.
Try converting the strings to numbers and you should be fine.

--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi