Page 4 of 9

Re: combining TIFF and CSV file with metadata

PostPosted: Thu Apr 26, 2012 1:27 pm
by Thorondor
Code: Select all
[omero@bqichipdb1 root]$ python
Python 2.4.3 (#1, Feb 22 2012, 16:05:45)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2                                                                                               
Type "help", "copyright", "credits" or "license" for more information.                                                                           
>>> import Ice                                                                                                                                   
>>>                                                                                                                                             
KeyboardInterrupt                                                                                                                               
>>>                                                                                                                                             
[omero@bqichipdb1 root]$ cd /data/applications/OMERO.server-Beta-4.3.4
[omero@bqichipdb1 OMERO.server-Beta-4.3.4]$ ls                                                                                                   
bin  docs  etc  include  lib  licenses  LICENSE.txt  OMERO4.3__0.sql  sql  var                                                                   
[omero@bqichipdb1 OMERO.server-Beta-4.3.4]$ cd bin/                                                                                             
[omero@bqichipdb1 bin]$ ls                                                                                                                       
omero  omero.bat  setpythonpath.bat  winconfig.bat                                                                                               
[omero@bqichipdb1 bin]$ ./omero admin start
Traceback (most recent call last):
  File "./omero", line 123, in ?
    rv = omero.cli.argv()
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/cli.py", line 1172, in argv
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/cli.py", line 722, in invoke
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/cli.py", line 791, in onecmd
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/cli.py", line 871, in execute
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/plugins/prefs.py", line 64, in open_and_close_config
  File "/data/applications/OMERO.server-Beta-4.3.4/lib/python/omero/plugins/admin.py", line 887, in open_config
    config = omero.config.ConfigXml(str(cfg_xml))
  File "/omero/OMERO.server-Beta-4.3.4/lib/python/omero/config.py", line 68, in __init__
  File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py", line 960, in XML
    parser = XMLTreeBuilder()
  File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py", line 1115, in __init__
    raise ImportError(
ImportError: No module named expat; use SimpleXMLTreeBuilder instead


all in the same terminal. What else could I check/change?

Re: combining TIFF and CSV file with metadata

PostPosted: Thu Apr 26, 2012 2:14 pm
by cxallan
Okay, so you're back to your original error then. Good. How did you install ElementTree? By using easy_install?

Re: combining TIFF and CSV file with metadata

PostPosted: Thu Apr 26, 2012 2:20 pm
by Thorondor
is ElementTree part of numexp, numpy or pytables? I did not use easy_install for these. I think I did not install ElemntTree, there are other admins installing other services/software.

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 27, 2012 8:04 am
by cxallan
No, it's a completely separate module. You could try and see if it can be imported separately:

Code: Select all
$ python
Python 2.4.3 (#1, Nov 11 2010, 13:30:19)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from elementtree import ElementTree
>>> print ElementTree.XML('<test/>')
<Element test at 2b5b828de368>
>>>


Depending on if that works or not you can check if it has been installed as an RPM:

Code: Select all
rpm -qf /usr/lib/python2.4/site-packages/elementtree/
...


Once you've done that we can see about fixing your ElementTree install.

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 27, 2012 9:03 am
by Thorondor
this seems to point down the problem:

Code: Select all
Python 2.4.3 (#1, Feb 22 2012, 16:05:45)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from elementtree import ElementTree
>>> print ElementTree.XML('<test/>')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py", line 960, in XML
    parser = XMLTreeBuilder()
  File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py", line 1115, in __init__
    raise ImportError(
ImportError: No module named expat; use SimpleXMLTreeBuilder instead
>>>
[omero@bqichipdb1 root]$ rpm -qf /usr/lib/python2.4/site-packages/elementtree/
python-elementtree-1.2.6-5

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 27, 2012 9:49 am
by cxallan
Okay, lets try re-installing ElementTree then:

Code: Select all
yum reinstall python-elementtree
...


Afterwards try and test ElementTree as you've done above and we'll see where we are.

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 27, 2012 10:27 am
by Thorondor
Code: Select all
>>> from elementtree import ElementTree
>>> print ElementTree.XML('<test/>')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py", line 959, in XML
    parser = XMLTreeBuilder()
  File "/usr/lib/python2.4/site-packages/elementtree/ElementTree.py", line 1114, in __init__
    raise ImportError(
ImportError: No module named expat; use SimpleXMLTreeBuilder instead


still the same problem. :-/

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 27, 2012 11:28 am
by cxallan
Okay, then let's see if your pyexpat.so is broken:

Code: Select all
$ python
Python 2.4.3 (#1, Nov 11 2010, 13:30:19)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.parsers.expat
>>> print xml.parsers.expat.__version__
$Revision: 17640 $
>>>


Code: Select all
$ ls -al /usr/lib64/python2.4/lib-dynload/pyexpat.so
-rwxr-xr-x 1 root root 180712 Nov 11  2010 /usr/lib64/python2.4/lib-dynload/pyexpat.so
$ rpm -qf /usr/lib64/python2.4/lib-dynload/pyexpat.so
python-2.4.3-27.el5_5.3
$ md5sum /usr/lib64/python2.4/lib-dynload/pyexpat.so
bda0d650a546d40ed19c98effda9647a  /usr/lib64/python2.4/lib-dynload/pyexpat.so

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 27, 2012 11:45 am
by Thorondor
Code: Select all
ls -al /usr/lib64/python2.4/lib-dynload/pyexpat.so
-rwxr-xr-x 1 root root 46448 Feb 22 22:06 /usr/lib64/python2.4/lib-dynload/pyexpat.so

rpm -qf /usr/lib64/python2.4/lib-dynload/pyexpat.so
python-libs-2.4.3-46.el5

md5sum /usr/lib64/python2.4/lib-dynload/pyexpat.so
27a2d7cf584450e8bba4b313d8d3170d  /usr/lib64/python2.4/lib-dynload/pyexpat.so


but when I try to import it:

Code: Select all
Python 2.4.3 (#1, Feb 22 2012, 16:05:45)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.parsers.expat
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib64/python2.4/xml/parsers/expat.py", line 4, in ?
    from pyexpat import *
ImportError: /usr/lib64/python2.4/lib-dynload/pyexpat.so: undefined symbol: XML_StopParser
>>>

Re: combining TIFF and CSV file with metadata

PostPosted: Fri Apr 27, 2012 5:23 pm
by cxallan
Okay, well that explains that then. I've got exactly the same library on my Centos system. It's likely that you have installed another package from outside the Centos main distribution that is not compatible with the system Python (probably expat). Next steps:

Code: Select all
$ ldd /usr/lib64/python2.4/lib-dynload/pyexpat.so
   libexpat.so.0 => /lib64/libexpat.so.0 (0x00002b465cc04000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b465ce26000)
   libc.so.6 => /lib64/libc.so.6 (0x00002b465d041000)
   /lib64/ld-linux-x86-64.so.2 (0x0000003bf4000000)
$ rpm -qf /lib64/libexpat.so.0
expat-1.95.8-8.3.el5_5.3
$ md5sum /lib64/libexpat.so.0
27decdf31adedd772fe306c225c81d89  /lib64/libexpat.so.0