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
RuntimeError: dictionary changed size during iteration from colors.py, 3.3 but not 3.2 #1401
Comments
If your in a position to test, try changing the lines:
To
Or even:
Cheers, |
Yup, either of those work, thanks! Well, the problem progresses, anyway, to: pv-chem-1762:tests jgehman$ ./backend_driver.py Not sure this warrants another ticket, as it's easily enough fixed by replacing all 'iteritems' with 'items' and 'iterkeys' with 'keys' in the offending file. After that, there's lot of ImportErrors, but I have to go to sleep now (East Coast Australia), I'll see if I can sort through the rest tomorrow. Many thanks. |
In light of this revelation, should we cap the python support for v1.2.0 at |
Given how far we are through the release cycle, I think that is a sensible idea unless there really are no more issues.
Yes:
@goneasync : How have you built/installed matplotlib? Normally, when using |
Yes, I've build/installed, per my most recent history excerpt (performed after thorough cleans): 682 sudo make -f make.osx PREFIX=/usr/local PYVERSION=3.3 fetch deps &> build33.log The build33b.log (the actual mpl_build) has a large block of "Running 2to3..." percentage updates, with no apparent hangups or errors. There are no other errors, only warnings during build, all of the sort: I'd edited make.osx, copied into the git cloned directory from a different tar.gz distribution, as follows: < ${PYTHON} -c 'import urllib; urllib.retrieve("${ZLIBURL}", "${ZLIBFILE}")' && < ${PYTHON} -c 'import urllib; urllib.retrieve("${FREETYPEURL}", "${FREETYPEFILE}")'
If it helps to illuminate anything, making the edits by hand (the ones to iteritems and iterkeys that @pelson highlights should have been handled by 2to3), and trying again to run example/tests/backend_driver.py, every module give the following failure at pylab.py: I admit I'm new to Python, so all I'm working from here is an intuition from 20 years of intermittent hacking in C, Perl, and other odds and ends, as well as reference to the Dusty Phillips book. I've tried a few variations on the import syntax in the matplotlib pylab.py module, to no avail. Taken all together, I suspect I've got something more for fundamental misconfigured on my system, and would be happy to entertain any ideas. Thanks! |
I got this error earlier today on python 3.2. I apparently installed mpl of a python2.7 version of the installation and the python 3.2 interpreter was picking up the compiled byte-code from 2.7. I nuked all my *.pyc files and that fixed everything. I installed from source, though. Have you tried that? |
*I mean the dictionary error, not the |
@dmcdouball I'll try that -- perhaps there's something in it with the import error as well? Can you run the backend_driver test successfully? |
I just ran into this ( |
Is this bug then resolved? (i.e. |
As far as I'm concerned, yes. But I wasn't the one who originally reported this. In any case I don't think there is enough here to act on. |
Ok, well then I'll close it for the time being since this appears to be resolved. @goneasync If it is the case that I have closed this erroneously and you can still reproduce this problem then please feel free to reopen the issue. |
I've been having some problems running matplotlib tests after installing into python3.3 on a Mac OS X 10.7.5. Build went fine, but:
pv-chem-1762:tests jgehman$ ./backend_driver.py
Traceback (most recent call last):
File "./backend_driver.py", line 25, in
import matplotlib.rcsetup as rcsetup
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/matplotlib/init.py", line 151, in
from matplotlib.rcsetup import (defaultParams,
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/matplotlib/rcsetup.py", line 20, in
from matplotlib.colors import is_color_like
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/matplotlib/colors.py", line 205, in
for k, v in cnames.items():
RuntimeError: dictionary changed size during iteration
I thought this might have something to do with a final comma in the dictionary define just above line 205, but deleting this hasn't helped.
The test does run under 3.2, however!
The text was updated successfully, but these errors were encountered: