Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #9790 (closed)

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

Bug: AccessInit hash collision when starting OMERO.web

Reported by: spli Owned by: wmoore
Priority: minor Milestone: OMERO-4.4.7
Component: Web Version: n.a.
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2012-11-20 (2)

Description

Start OMERO.web, opening localhost:4080 immediately causes server to exit:

$ bin/omero web start

0 static files copied to '/Users/simon/work/openmicroscopy/dist/lib/python/omeroweb/static' (737 unmodified).
Starting OMERO.web... Validating models...

0 errors found
Django version 1.3.1, using settings 'omeroweb.settings'
Development server is running at http://0.0.0.0:4080/
Quit the server with CONTROL-C.
AccessInit: hash collision: 3 for both 1 and 1

This has been reported by others as a problem with mixing from PIL import Image / import Image in DJango
http://jaredforsyth.com/blog/2010/apr/28/accessinit-hash-collision-3-both-1-and-1/

Change History (5)

comment:1 Changed 11 years ago by wmoore

  • Milestone changed from Unscheduled to OMERO-4.5
  • Owner changed from web-team@… to wmoore
  • Sprint set to 2012-11-20 (2)

comment:2 Changed 11 years ago by wmoore

  • Status changed from new to accepted

comment:3 Changed 11 years ago by wmoore

It seems we're mostly going what is suggested by the link above:

try:
    from PIL import Image..
except
    import Image

The exception is in gateway/init.py where it is done the other way around:

try:
    import Image, ImageDraw, ImageFont
except: #pragma: nocover
    try:
        from PIL import Image, ImageDraw, ImageFont

So let's fix this and see if it works.

$ grep "import Image" -r components/tools/OmeroPy/

components/tools/OmeroPy/src/omero/gateway/__init__.py:    import Image, ImageDraw, ImageFont
components/tools/OmeroPy/src/omero/gateway/__init__.py:        from PIL import Image, ImageDraw, ImageFont
components/tools/OmeroPy/src/omero/util/figureUtil.py:    from PIL import Image, ImageDraw, ImageFont # see ticket:2597
components/tools/OmeroPy/src/omero/util/figureUtil.py:    import Image, ImageDraw, ImageFont # see ticket:2597
components/tools/OmeroPy/src/omero/util/imageUtil.py:    from PIL import Image, ImageDraw, ImageFont # see ticket:2597
components/tools/OmeroPy/src/omero/util/imageUtil.py:    import Image, ImageDraw, ImageFont # see ticket:2597
components/tools/OmeroPy/src/omero/util/OmeroPopo.py:from omero.model import ImageI
components/tools/OmeroPy/src/omero/util/populate_metadata.py:from omero.grid import ImageColumn, LongColumn, PlateColumn, StringColumn, \
components/tools/OmeroPy/src/omero/util/populate_roi.py:from omero.grid import ImageColumn, WellColumn, RoiColumn, LongColumn, DoubleColumn
components/tools/OmeroPy/src/omero/util/ROIDrawingUtils.py:    from PIL import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/src/omero/util/ROIDrawingUtils.py:    import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/src/omero/util/ROIDrawingUtils.py:    from PIL import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/src/omero/util/ROIDrawingUtils.py:    import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/src/omero/util/script_utils.py:         from PIL import Image # see ticket:2597
components/tools/OmeroPy/src/omero/util/script_utils.py:         import Image # see ticket:2597
components/tools/OmeroPy/src/omero/util/script_utils.py:        from PIL import Image
components/tools/OmeroPy/src/omero/util/script_utils.py:        import Image

# scripts
components/tools/OmeroPy/scripts/omero/analysis_scripts/Kymograph.py:    from PIL import Image
components/tools/OmeroPy/scripts/omero/analysis_scripts/Kymograph.py:    import Image
components/tools/OmeroPy/scripts/omero/analysis_scripts/Plot_Profile.py:    from PIL import Image
components/tools/OmeroPy/scripts/omero/analysis_scripts/Plot_Profile.py:    import Image
components/tools/OmeroPy/scripts/omero/export_scripts/Make_Movie.py:    from PIL import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/export_scripts/Make_Movie.py:    import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/figure_scripts/Movie_Figure.py:    from PIL import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/figure_scripts/Movie_Figure.py:    import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/figure_scripts/Movie_ROI_Figure.py:from omero.model import ImageI
components/tools/OmeroPy/scripts/omero/figure_scripts/Movie_ROI_Figure.py:    from PIL import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/figure_scripts/Movie_ROI_Figure.py:    import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/figure_scripts/ROI_Split_Figure.py:    from PIL import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/figure_scripts/ROI_Split_Figure.py:    import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/figure_scripts/Split_View_Figure.py:    from PIL import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/figure_scripts/Split_View_Figure.py:    import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/figure_scripts/Thumbnail_Figure.py:    from PIL import Image, ImageDraw # see ticket:2597
components/tools/OmeroPy/scripts/omero/figure_scripts/Thumbnail_Figure.py:    import Image, ImageDraw # see ticket:2597

comment:4 Changed 11 years ago by wmoore

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:5 Changed 11 years ago by Will Moore <will@…>

(In [c90c95fd81977373a8727a4137db1e8c1f174f56/ome.git] on branch develop) Blitz gateway imports Image from PIL first. See #9790

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.67366 sec.)

We're Hiring!