matplotlib not plotting dates

OKB (not okblacke) brenNOSPAMbarn at NObrenSPAMbarn.net
Tue Aug 8 14:42:55 EDT 2006


    	I just downloaded matplotlib and I was trying to do some simple 
date plots, but I'm running up against a puzzling error.  Whenever I 
attempt to plot dates, I get an exception on line 157 of 
matplotlib/dates.py that says 'ValueError: need more than 0 values to 
unpack'.  That line is:

    	hour, remainder = divmod(24*remainder, 1)

    	I don't understand how divmod can be returning 0 values.  I 
inserted a statement into dates.py to "print divmod(24*remainder, 1)" 
and, mind-bogglingly, it actually printed "()" sometimes.

    	The traceback indicates that this error is occuring when matplotlib 
tries to set up the axis labels for the date plot.  I don't know enough 
about matplotlib to know exactly what it's doing, though.

    	Does anyone have any ideas for how to fix this?  This error occurs 
even with the matplotlib example scripts (e.g., date_demo1.py).

    	I'm running it on Windows XP, Python 2.4, and my matplotlibrc file 
just has the default settings (TkAgg backend).

-- 
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead.  Go, instead, where there is
no path, and leave a trail."
	--author unknown



More information about the Python-list mailing list