Again: AccessInit: hash collision: 3 for both 1 and 1

Anonymous avatarAnonymous created an issue

Hi, a lot of people still get the "AccessInit: hash collision: 3 for both 1 and 1" error, even after patching as suggested in http://jaredforsyth.com/blog/2010/apr/28/accessinit-hash-collision-3-both-1-and-1/. I've seen it also in version 1.0.7 on Windows as well as some Linux dists. What can it be ? H.M. Ref: #599

Comments (9)

  1. Anonymous

    After I did pip install --upgrade sphinx (from 1.0.7 to 1.1) I got the AccessInit problem immediately. After applying Jared's patches I get AccessInit when I try to use autodoc:

    C:\<snip>python
    Enthought Python Distribution -- www.enthought.com
    Version: 7.1-2 (64-bit)
    
    Python 2.7.2 |EPD 7.1-2 (64-bit)| (default, Jul  3 2011, 15:34:33) [MSC v.1500 6
    4 bit (AMD64)] on win32
    Type "packages", "demo" or "enthought" for more information.
    >>> import sphinx
    >>> sphinx.__version__
    '1.1'
    >>> import pygments
    >>> pygments.__version__
    '1.4'
    >>> import docutils
    >>> docutils.__version__
    '0.8.1'
    >>> exit()
    

    Now Sphinx partly works:

    C:\<snip>make html
    Running Sphinx v1.1
    loading pickled environment... failed: env version not current
    building [html]: targets for 3 source files that are out of date
    updating environment: 3 added, 0 changed, 0 removed
    reading sources... [ 33%] index
    reading sources... [ 66%] kent
    AccessInit: hash collision: 3 for both 1 and 1
    

    kent.rst has an automodule directive. It all works fine when I remove that directive.

  2. Jon Olav Vik

    I had the same issue on Sphinx 1.1.2, pygments 1.4, docutils 0.8.1, Python 2.7.2, Windows 7. The patches at http://jaredforsyth.com/blog/2010/apr/28/accessinit-hash-collision-3-both-1-and-1/ solved it for me.

    Before:

    c:\test\doc>make clean
    c:\test\doc>make html
    Making output directory...
    Running Sphinx v1.1.2
    AccessInit: hash collision: 3 for both 1 and 1
    

    After:

    c:\test\doc>make html
    Making output directory...
    Running Sphinx v1.1.2
    loading pickled environment... not yet created
    loading intersphinx inventory from http://docs.python.org/objects.inv...
    [...]
    building [html]: targets for 3 source files that are out of date
    updating environment: 3 added, 0 changed, 0 removed
    reading sources... [ 33%]
    [...]
    
  3. Anonymous

    Follow up to my anonymous post of 2011-10-22:

    Despite applying all the changes listed in the link at Jared, the problem remains for me, with the same version of all software listed by jonovik. A successful workaround is to put the code listed here http://jaredforsyth.com/blog/2010/apr/28/accessinit-hash-collision-3-both-1-and-1/#comment-51077924 at the top of conf.py:

    import sys
    import PIL.Image
    sys.modules['Image'] = PIL.Image
    

    Not sure where a better place to put it might be.

  4. Werner Bruhin

    Just FYI,

    Can confirm that Anonymous post #5 is doing the trick for me too. Tried the other things but they didn't work.

    Python 2.7.2, Win 7, Sphinx 1.1.2, Graphviz2.26.3, docutils 0.8.1, Pygments 1.4

  5. ccanepa

    Using Sphinx 1.1.3 , docutils 0.9 , pygments 1.5, python 2.6.6 , windows xp Solved the problem like in #5, only that I patched Scripts\sphinx-build-script.py

  6. Takayuki Shimizukawa

    I think this problem was already fixed with:

    • Sphinx-1.0 : using "from PIL import Image"
    • docutils 0.9 : using "import PIL" first.
    • pygments 1.5 : using "from PIL import Image"

    and I recommend to use Pillow-1.7.x (PIL compatible and better) that accept only "import PIL" or "from PIL import Image" (avoid "import Image").

    Please let me know if problem reproduce again. Thanks.

  7. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.