Menu

#858 "AccessInit: hash collision: 3 for both 1 and 1" crash for "import pybel, matplotlib.backends.backend_qt4agg"

2.3.x
closed
nobody
pybel (2)
1
2014-08-23
2013-01-29
No

importing pybel and matplotlib.backends.backend_qt4agg crashes with error
"AccessInit: hash collision: 3 for both 1 and 1"

On windows XP, I have the latest pythonxy with python 2.7.3 and matplotlib 1.1.1; I have installed openbabel gui 2.3.1 and the python bindings version 1.7. pybel/openbabel work as expected from a python CLI. Matplotlib as well, as long as they are not used together. However,

>>> import pybel
>>> import matplotlib.backends.backend_qt4agg
AccessInit: hash collision: 3 for both 1 and 1

---python crash and forceful exit---

importing matplotlib.backends.backend_qt4agg first produces the same error.

Note that I got the same error with python 2.7.2 from an older pythonxy, I then updated my pythonxy to 2.7.3.1 to make sure the error was still present on the latest version.

Discussion

  • Noel O'Boyle

    Noel O'Boyle - 2013-01-31

    Looks like a PIL (Python imaging library) conflict. Try commenting out the relevant import statement in pybel.py.

     
    • Mathias Laurin

      Mathias Laurin - 2013-01-31

      Yes. It looks like the problem is on Matplotlib, I just changed
      "from PIL import Image" to "import Image" in matplotlib/backend_bases.py
      following the recommendation from this blog post:
      http://jaredforsyth.com/blog/2010/apr/28/accessinit-hash-collision-3-both-1-and-1/#the-solution
      and I can load pybel and matplotlib together now.

      It also looks like Matplotlib loads PIL "the wrong way" in other modules, should I report it to them?

       
  • Geoff Hutchison

    Geoff Hutchison - 2014-03-15
    • status: open --> closed
     
  • Geoff Hutchison

    Geoff Hutchison - 2014-03-15

    I'm closing this. It seems like a matplotlib bug and I suspect it has already been resolved.