We're Hiring!

Figure and PDF export

General user discussion about using the OMERO platform to its fullest. Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

There are workflow guides for various OMERO functions on our help site - http://help.openmicroscopy.org

You should find answers to any basic questions about using the clients there.

Re: Figure and PDF export

Postby phm » Mon Aug 08, 2016 9:53 am

atarkowska wrote:Could you also tell which 404 we are talking about exactly? Is that omero.web grey page?

What is the output of
Code: Select all
curl -I https://omero.college-de-france.fr/omero


Ola


Hi Ola

It's the blank page as
Code: Select all
Not Found

The requested URL /omero/webclient/login/ was not found on this server.

Apache/2.2.15 (CentOS) Server at omero.college-de-france.fr Port 443


[root@omero omero]# curl -I https://omero.college-de-france.fr/omero
Code: Select all
curl: (60) Peer certificate cannot be authenticated with known CA certificates
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.


Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Figure and PDF export

Postby kennethgillen » Mon Aug 08, 2016 10:12 am

phm wrote:Hi Kenneth,
these are files that you want.


Hi Philippe,

I noticed from a previous post, and your latest error message, you no longer use nginx. The config files you previously sent in this thread were the nginx config - could you please attach the Apache config files that you are using, as well as the latest logfiles from Apache.

** Note: not necessary, of course, if you actually should be using NGINX as per Ola's post above.

Thanks
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: Figure and PDF export

Postby atarkowska » Mon Aug 08, 2016 10:32 am

Philippe, I would like to poin that in http://www.openmicroscopy.org/community ... =40#p16404 you asked about help in upgrading to OMERO 5.2 and you switched to use NGINX as you had issues with apache. If this has changed since Nov 2015 you should point it in the beggingin of your question that you changed webserver. My impresison is that you are still using NGINX as your omero confing and web config say so. I would recommand you to turn off apache and start nginx

For the future you may want to uninstall apache permanently!

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Figure and PDF export

Postby phm » Mon Aug 08, 2016 12:09 pm

atarkowska wrote:Philippe, I would like to poin that in http://www.openmicroscopy.org/community ... =40#p16404 you asked as about help to upgrade to OMERO 5.2 and you switched to use NGINX as you had issues with apache. If this has changed since Nov 2015 you should point it in the beggingin of your question that you changed webserver. My impresison is that you are still using NGINX as your omero confing and web config say so. I would recommand you to turn off apache and start nginx

For the future you may want to uninstall apache permanently!

Ola

Hi Ola
Sorry for the confusion. :roll:
I stopped and removed apache and started nginx. Now the omero is web working. However the pdf export return always the same message :
Code: Select all
Traceback (most recent call last):
  File "./script", line 1716, in <module>
    runScript()
  File "./script", line 1703, in runScript
    fileAnnotation = export_figure(conn, scriptParams)
  File "./script", line 1660, in export_figure
    return figExport.buildFigure()
  File "./script", line 688, in buildFigure
    self.add_panels_to_page(panels_json, imageIds, page)
  File "./script", line 1343, in add_panels_to_page
    image, pilImg = self.drawPanel(panel, page, i)
  File "./script", line 1166, in drawPanel
    self.pasteImage(pilImg, imgName, panel, page, dpi)
  File "./script", line 1452, in pasteImage
    pilImg.save(imgName)
  File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/PIL/Image.py", line 1665, in save
    save_handler(self, fp, filename)
  File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/PIL/TiffImagePlugin.py", line 1320, in _save
    offset = ifd.save(fp)
  File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/PIL/TiffImagePlugin.py", line 608, in save
    if len(data) <= 4:
TypeError: object of type 'int' has no len()

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Figure and PDF export UPDATED

Postby wmoore » Tue Aug 09, 2016 9:23 am

Hi Philippe,

You're seeing this error: https://github.com/python-pillow/Pillow/issues/1524 which I've only seen with Pillow 3.0.0. I just tried this on my Mac and reproduced the same error. However, if you use Pillow 2.9 then this should work fine.

Regards,

Will
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: Figure and PDF export

Postby atarkowska » Tue Aug 09, 2016 10:35 am

Philippe, Will originally pointed to insall Pillow 3.3.0 but this version may not be compativle with numpy. Please make sure you install 2.9, see https://trello.com/c/jZjPZf8K/637-attri ... te-tobytes

Please remember to follow viewtopic.php?f=4&t=8083&start=20#p17322

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: Figure and PDF export

Postby phm » Tue Aug 09, 2016 2:09 pm

atarkowska wrote:Philippe, Will originally pointed to insall Pillow 3.3.0 but this version may not be compativle with numpy. Please make sure you install 2.9, see https://trello.com/c/jZjPZf8K/637-attri ... te-tobytes

Please remember to follow viewtopic.php?f=4&t=8083&start=20#p17322

Ola

Hi Ola,
Pillow 3.30 was installed on the server, so I removed Pillow, but how to install Pillow 2.9 ?
pip install Pillow install the 3.30 version and pip install Pillow-2.9 could not find the version

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Figure and PDF export

Postby kennethgillen » Tue Aug 09, 2016 2:22 pm

Using whichever method you found to install/uninstall inside the Python instance your OMERO is using..

Code: Select all
pip install Pillow<3.0


Cheers,

Kenny

** Note: above should be
Code: Select all
pip install "Pillow<3.0"
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: Figure and PDF export

Postby phm » Tue Aug 09, 2016 2:51 pm

kennethgillen wrote:Using whichever method you found to install/uninstall inside the Python instance your OMERO is using..

Code: Select all
pip install Pillow<3.0


Cheers,

Kenny

Hi Kenneth

Thank, however in Centos the good syntax is :
pip install Pillow==2.90

But after restarted the web server the error for pdf export in Figures is the same....

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Figure and PDF export

Postby wmoore » Tue Aug 09, 2016 3:16 pm

Hi Philippe,

Are you sure you're still seeing this error:

Code: Select all
packages/PIL/TiffImagePlugin.py", line 608, in save
    if len(data) <= 4:
TypeError: object of type 'int' has no len()


If so, then it seems that you're somehow still running Pillow 3.0 since Pillow 2.9 doesn't have that code at line 608: https://github.com/python-pillow/Pillow ... in.py#L608
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

PreviousNext

Return to User Discussion

Who is online

Users browsing this forum: No registered users and 1 guest