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.

Figure and PDF export

Postby phm » Tue Jul 19, 2016 2:27 pm

Hi,

I installed figure script and everything work nice except the PDF export, I got the following message :
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 664, in buildFigure
self.createFigure()
File "./script", line 1363, in createFigure
"Need to install https://bitbucket.org/rptlab/reportlab")
ImportError: Need to install https://bitbucket.org/rptlab/reportlab

I did the reportlab, markdown installations and upload figure export script as explain in web site.
omero script list report :
id | Official scripts
--------+-----------------------------------------------
4 | /omero/import_scripts/Populate_ROI.py
101 | /omero/util_scripts/Channel_Offsets.py
233651 | /omero/util_scripts/Combine_Images.py
523551 | /omero/util_scripts/Images_From_ROIs.py
517901 | /omero/util_scripts/Dataset_To_Plate.py
523552 | /omero/figure_scripts/Movie_ROI_Figure.py
517902 | /omero/figure_scripts/Thumbnail_Figure.py
517903 | /omero/figure_scripts/Split_View_Figure.py
233655 | /omero/figure_scripts/Movie_Figure.py
564539 | /omero/figure_scripts/Figure_To_Pdf.py
523553 | /omero/figure_scripts/ROI_Split_Figure.py
14 | /omero/setup_scripts/FLIM_initialise.py
233657 | /omero/analysis_scripts/Kymograph_Analysis.py
16 | /omero/analysis_scripts/Plot_Profile.py
233658 | /omero/analysis_scripts/Kymograph.py
233659 | /omero/export_scripts/Make_Movie.py
523554 | /omero/export_scripts/Batch_Image_Export.py
(17 rows)

restart the omero web server

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

Re: Figure and PDF export

Postby Dominik » Wed Jul 20, 2016 10:46 am

Hi Philippe,

did you use pip or easy_install to install reportlab?
What's the output of 'pip show reportlab'?

Regards,
Dominik
User avatar
Dominik
Team Member
 
Posts: 149
Joined: Mon Feb 10, 2014 11:26 am

Re: Figure and PDF export

Postby phm » Fri Jul 22, 2016 12:09 pm

Hi Dominik,

I used pip install reportlab.

[root@omero omero]# pip show reportlab
---
Metadata-Version: 1.1
Name: reportlab
Version: 3.3.0
Summary: The Reportlab Toolkit
Home-page: http://www.reportlab.com/
Author: Andy Robinson, Robin Becker, the ReportLab team and the community
Author-email: reportlab-users@lists2.reportlab.com
License: BSD license (see license.txt for details), Copyright (c) 2000-2015, ReportLab Inc.
Location: /usr/local/lib/python2.7/site-packages
Requires: pillow, pip, setuptools
Classifiers:
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Topic :: Printing
Topic :: Text Processing :: Markup
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4


but if I not root
[omero@omero ~]$ pip show reportlab
pip show reportlab
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

[root@omero omero]# pip install --upgrade pip
Requirement already up-to-date: pip in /usr/local/lib/python2.7/site-packages

??

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

Re: Figure and PDF export

Postby kennethgillen » Fri Jul 22, 2016 4:25 pm

Hi Philippe,

It can't do any harm to uninstall and reinstall Reportlab, as root, to see if that has any effect.

As root:

Code: Select all
pip remove reportlab
pip install reportlab


Then, check available versions:

Code: Select all
pip freeze | grep -iEe "(reportlab|pillow)"
sudo -u omero pip freeze | grep -iEe "(reportlab|pillow)"


This has certainly helped me out when I had issues with Yum supplied pillow conflicting with pip installed pillow.

Best,

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

Re: Figure and PDF export

Postby phm » Thu Jul 28, 2016 2:27 pm

Hi Kenneth,

[root@omero omero]# pip uninstall reportlab
Code: Select all
Uninstalling reportlab-3.3.0:
.....
Successfully uninstalled reportlab-3.3.0

[root@omero omero]# pip install reportlab
Code: Select all
Collecting reportlab
...
Successfully installed reportlab-3.3.0 setuptools-0.8b2

[root@omero omero]# pip freeze | grep -iEe "(reportlab|pillow)"
Code: Select all
Pillow==3.3.0
reportlab==3.3.0

[root@omero omero]# omero pip freeze | grep -iEe "(reportlab|pillow)"
return nothing
And
[omero@omero ~]$ pip freeze | grep -iEe "(reportlab|pillow)"
Code: Select all
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Pillow==3.0.0



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

Re: Figure and PDF export

Postby kennethgillen » Thu Jul 28, 2016 3:53 pm

Hi Philippe,

Could you try the following for us, please?

Code: Select all
[omero@omero ~]$ which pip
[omero@omero ~]$ which python


Thanks

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

Re: Figure and PDF export

Postby phm » Thu Jul 28, 2016 4:19 pm

Hi Kenneth,

[omero@omero ~]$ which pip
Code: Select all
/opt/rh/python27/root/usr/bin/pip

[omero@omero ~]$ which python
Code: Select all
/opt/rh/python27/root/usr/bin/pyhton


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

Re: Figure and PDF export

Postby kennethgillen » Fri Jul 29, 2016 10:22 am

Hi Philippe,

If you do the same as root, does it show the same python and pip as for the omero user?

Code: Select all
[root@omero omero]# which pip
[root@omero omero]# which python
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: Figure and PDF export

Postby phm » Mon Aug 01, 2016 9:21 am

kennethgillen wrote:Hi Philippe,

If you do the same as root, does it show the same python and pip as for the omero user?

Code: Select all
[root@omero omero]# which pip
[root@omero omero]# which python


Hi Kenneth,

[root@omero omero]# which pip
/usr/local/bin/pip
[root@omero omero]# which python
/usr/local/bin/python

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

Re: Figure and PDF export

Postby kennethgillen » Mon Aug 01, 2016 9:41 am

To tell if this is a completely different python install let's see where those point:

Code: Select all
[root@omero omero]# ls -l /usr/local/bin/ | grep -E "pip|python"

The last time you ran the suggested reinstall reportlab, it was as the root user.

Let's see if what happens if we try that as the omero user:

As OMERO:

Code: Select all
[omero@omero ~]$ pip install reportlab

[omero@omero ~]$ pip freeze | grep -iEe "(reportlab|pillow)"


All the best,

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

Next

Return to User Discussion

Who is online

Users browsing this forum: No registered users and 1 guest