[ome-users] global name 'Image' is not defined?
Chris Allan
callan at lifesci.dundee.ac.uk
Mon Aug 15 13:32:24 BST 2011
Couple things:
"You need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/"
Have you got that anywhere in your OMEROweb.log?
Could you give us some idea about your deployment platform? Is this RHEL6? Have you compiled your own Python? Could you give us the output of "bin/omero admin diagnostics"?
-Chris
On 15 Aug 2011, at 13:12, Leon Kolchinsky wrote:
> Hello Wiil,
>
> I've reinstalled PIL using pip:
>
> # pip install -U PIL
> PIL 1.1.7 SETUP SUMMARY
> --------------------------------------------------------------------
> version 1.1.7
> platform linux2 2.6.5 (r265:79063, Feb 28 2011, 21:55:45)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)]
> --------------------------------------------------------------------
> *** TKINTER support not available
> --- JPEG support available
> --- ZLIB (PNG/ZIP) support available
> --- FREETYPE2 support available
> *** LITTLECMS support not available
> --------------------------------------------------------------------
> To add a missing option, make sure you have the required
> library, and set the corresponding ROOT variable in the
> setup.py script.
>
> To check the build, run the selftest.py script.
> changing mode of build/scripts-2.6/pilprint.py from 644 to 755
> changing mode of build/scripts-2.6/pilfont.py from 644 to 755
> changing mode of build/scripts-2.6/pilconvert.py from 644 to 755
> changing mode of build/scripts-2.6/pilfile.py from 644 to 755
> changing mode of build/scripts-2.6/pildriver.py from 644 to 755
> changing mode of /usr/bin/pilprint.py to 755
> changing mode of /usr/bin/pilfont.py to 755
> changing mode of /usr/bin/pilconvert.py to 755
> changing mode of /usr/bin/pilfile.py to 755
> changing mode of /usr/bin/pildriver.py to 755
> Successfully installed PIL
> Cleaning up...
>
>
> The problem still persists ;(
> When I login to webclient I'm getting this in the OMEROweb.log while clicking on "My account" link:
>
> Mon, 15 Aug 2011 13:09:36 blitz_gateway INFO created connection (uuid=d6f0a2b2-c22c-4969-9849-2435fa7dcecb)
> Mon, 15 Aug 2011 13:09:36 views-admin INFO Have connection as Guest
> Mon, 15 Aug 2011 13:09:36 views-admin INFO Client version: '4.3.1-6d4b8c61-b2602'; Server version: '4.3.1-6d4b8c61-b2602'
> Mon, 15 Aug 2011 13:09:36 webgateway INFO getBlitzConnection(host=vera144.its.mydomain.edu.au, port=4064, ssl=False, username=myuser)
> Mon, 15 Aug 2011 13:09:36 blitz_gateway INFO created connection (uuid=5bcc0d30-76d1-48bb-8bdb-f8df778497da)
> Mon, 15 Aug 2011 13:09:41 omero.util.UpgradeCheck INFO no update needed
> Mon, 15 Aug 2011 13:09:41 utils ERROR Up to date.
>
> Mon, 15 Aug 2011 13:09:42 blitz_gateway INFO created connection (uuid=5bcc0d30-76d1-48bb-8bdb-f8df778497da)
> Mon, 15 Aug 2011 13:09:42 blitz_gateway INFO created connection (uuid=5bcc0d30-76d1-48bb-8bdb-f8df778497da)
> Mon, 15 Aug 2011 13:09:59 webclient_gateway ERROR Traceback (most recent call last):
> File "/srv/OMERO.server-Beta-4.3.1/lib/python/omeroweb/webclient/webclient_gateway.py", line 687, in getExperimenterPhoto
> photo = self.getExperimenterDefaultPhoto()
> File "/srv/OMERO.server-Beta-4.3.1/lib/python/omeroweb/webclient/webclient_gateway.py", line 778, in getExperimenterDefaultPhoto
> img = Image.open(settings.DEFAULT_USER)
> NameError: global name 'Image' is not defined
>
> Mon, 15 Aug 2011 13:10:00 views-feedback ERROR handler500: Server error
> Mon, 15 Aug 2011 13:10:00 views-feedback ERROR Traceback (most recent call last):
>
> File "/srv/omeroserver/lib/python/django/core/handlers/base.py", line 92, in get_response
> response = callback(request, *callback_args, **callback_kwargs)
>
> File "/srv/omeroserver/lib/python/omeroweb/webclient/views.py", line 165, in wrapped
> return f(request, *args, **kwargs)
>
> File "/srv/omeroserver/lib/python/omeroweb/webclient/views.py", line 2366, in myphoto
> photo = conn.getExperimenterPhoto()
>
> File "/srv/OMERO.server-Beta-4.3.1/lib/python/omeroweb/webclient/webclient_gateway.py", line 690, in getExperimenterPhoto
> photo = self.getExperimenterDefaultPhoto()
>
> File "/srv/OMERO.server-Beta-4.3.1/lib/python/omeroweb/webclient/webclient_gateway.py", line 778, in getExperimenterDefaultPhoto
> img = Image.open(settings.DEFAULT_USER)
>
> NameError: global name 'Image' is not defined
>
> Any idea how to fix it?
>
> Cheers,
> Leon Kolchinsky
>
>
>
> On Mon, Aug 15, 2011 at 15:09, Will Moore <will at lifesci.dundee.ac.uk> wrote:
> Hi,
>
> This looks like a failure to import PIL (python imaging library).
>
> You should be seeing in your log (var/lob/OMERO-web.log) something like this:
> "You need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/"
>
> There are also some mentions on our install pages of how to install PIL.
> Although it's not really needed in this case (default user photo is not critical) you will find that various other features of the webclient are also dependent on PIL.
>
> Will.
>
>
> On 15 Aug 2011, at 02:11, Leon Kolchinsky wrote:
>
>> Hello,
>>
>> I'm getting those messages from the system while new users log into Omero web client.
>> Any tips on how to fix it or if it's OK, how to stop those messages?
>>
>> Traceback (most recent call last):
>>
>> File "/srv/omeroserver/lib/python/django/core/handlers/base.py", line 92, in get_response
>> response = callback(request, *callback_args, **callback_kwargs)
>>
>> File "/srv/omeroserver/lib/python/omeroweb/webclient/views.py", line 165, in wrapped
>> return f(request, *args, **kwargs)
>>
>> File "/srv/omeroserver/lib/python/omeroweb/webclient/views.py", line 2366, in myphoto
>> photo = conn.getExperimenterPhoto()
>>
>> File "/srv/OMERO.server-Beta-4.3.1/lib/python/omeroweb/webclient/webclient_gateway.py", line 690, in getExperimenterPhoto
>> photo = self.getExperimenterDefaultPhoto()
>>
>> File "/srv/OMERO.server-Beta-4.3.1/lib/python/omeroweb/webclient/webclient_gateway.py", line 778, in getExperimenterDefaultPhoto
>> img = Image.open(settings.DEFAULT_USER)
>>
>> NameError: global name 'Image' is not defined
>>
>>
>> <WSGIRequest
>> GET:<QueryDict: {}>,
>> POST:<QueryDict: {}>,
>> COOKIES:{'__utma': '192312886.1704004095.1303085135.1312265964.1313025486.33',
>> '__utmz': '192312886.1312265964.32.21.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=mydomain%20eResearch',
>> 'sessionid': '9ce727d572e0871b3d042549a2a582f7'},
>> META:{'DOCUMENT_ROOT': '/var/www/html',
>> 'GATEWAY_INTERFACE': 'CGI/1.1',
>> 'HTTP_ACCEPT': '*/*',
>> 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
>> 'HTTP_ACCEPT_LANGUAGE': 'en-us',
>> 'HTTP_CONNECTION': 'keep-alive',
>> 'HTTP_COOKIE': 'sessionid=9ce727d572e0871b3d042549a2a582f7; __utma=175132154.1224947860.1303083934.1309411927.1313033085.5; __utmz=175132154.1306203174.3.2.utmccn=(organic)|utmcsr=google|utmctr=it+service+desk+mydomain|utmcmd=organic; __utmz=192312886.1312265964.32.21.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=mydomain%20eResearch; __utma=192312886.1704004095.1303085135.1312265964.1313025486.33',
>> 'HTTP_HOST': 'vera144.its.mydomain.edu.au',
>> 'HTTP_REFERER': 'http://vera144.its.mydomain.edu.au/webclient/upload_myphoto/',
>> 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50',
>> 'PATH': '/sbin:/usr/sbin:/bin:/usr/bin',
>> 'PATH_INFO': u'/webclient/myphoto/',
>> 'PATH_TRANSLATED': '/srv/omeroserver/var/omero.fcgi/webclient/myphoto/',
>> 'QUERY_STRING': '',
>> 'REMOTE_ADDR': '130.194.148.244',
>> 'REMOTE_PORT': '49846',
>> 'REQUEST_METHOD': 'GET',
>> 'REQUEST_URI': '/webclient/myphoto/',
>> 'SCRIPT_FILENAME': '/srv/omeroserver/var/omero.fcgi',
>> 'SCRIPT_NAME': u'',
>> 'SERVER_ADDR': '130.194.245.189',
>> 'SERVER_ADMIN': 'root at localhost',
>> 'SERVER_NAME': 'vera144.its.mydomain.edu.au',
>> 'SERVER_PORT': '80',
>> 'SERVER_PROTOCOL': 'HTTP/1.1',
>> 'SERVER_SIGNATURE': '<address>Apache/2.2.3 (Red Hat) Server at vera144.its.mydomain.edu.au Port 80</address>\n',
>> 'SERVER_SOFTWARE': 'Apache/2.2.3 (Red Hat)',
>> 'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x1d1cc890>,
>> 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x1d1cc410>,
>> 'wsgi.multiprocess': True,
>> 'wsgi.multithread': False,
>> 'wsgi.run_once': False,
>> 'wsgi.url_scheme': 'http',
>> 'wsgi.version': (1, 0)}>
>>
>>
>> Cheers,
>> Leon Kolchinsky
>>
>> _______________________________________________
>> ome-users mailing list
>> ome-users at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>
> William Moore
> Wellcome Trust Centre for Gene Regulation & Expression
> College of Life Sciences
> MSI/WTB/JBC Complex
> University of Dundee
> Dow Street
> Dundee DD1 5EH
> United Kingdom
>
> Phone 01382 386364
> http://openmicroscopy.org
>
>
>
>
>
>
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
More information about the ome-users
mailing list