Troubleshooting (METRo)
From Documentation
[edit] Error in the execution of metro --selftest
After writting
python metro --selftest
the following error message is produced
metro_util.py:15: RuntimeWarning: Python C API version mismatch for module arrayfns: This Python has API version 1011, module arrayfns has version 1012. import arrayfns metro_util.py:15: RuntimeWarning: Python C API version mismatch for module _numpy: This Python has API version 1011, module _numpy has version 1012. import arrayfnsTraceback (most recent call last): File "metro", line 14, in ? import metro_logger File "metro_logger.py", line 6, in ? import metro_config File "metro_config.py", line 5, in ? import metro_config_validation File "metro_config_validation.py", line 8, in ? import metro_date File "metro_date.py", line 7, in ? import W3CDate ImportError: No module named W3CDate
[edit] Resolution
This is because it is the old version of python that is loaded.
You must change the first line of the file metro. Replace
#!/usr/bin/env python
by
#!/usr/local/bin/python
or by any other path where the required python version is installed.
When an upgrade of python is needed to have the version 2.3, the binary is copied in the directory
/usr/local/bin
But, when the command "python" is written in command line, it is the old binary in
/usr/bin/python
that is loaded, even if the environment variable
PATH
had the right value and that the command
which python
returns the correct path.
[edit] python is unable to find the libxml2 library
The execution of code
./metro --selftest
give the following error:
* Initialising METRo * Auto configure METRo XML library [!!] Fatal error! No METRo XML library can be use. METRo need one of the following XML library installed on the system. Supported library:libxml2, PyXML
[edit] Resolution
The libxml2-python library is not installed in the right directory.
If you got this error, you surely did an upgrade of python in order to run METRo. But, when you install the libxml2-python library as specified in the installation procedure, you must use the right version of python. As an example, suppose that the binary of python 2.3 is installed in the /usr/local/bin directory, you must install the libxml2-python with the following command:
/usr/local/bin/python setup.py install
[edit] The version of libxml2-python corresponding to the version of the libxml2 installed on the computer does not exists
In the installation procedure, we ask to execute the command:
ls /usr/lib | grep libxml2.so
and to install the version corresponding to libxml2 for the .so file. For specific versions of libxml2, the corresponding libxml2-python bindings does not always exists. For example, the following version does not exists:
- 2.5.9
- 2.5.10
- 2.4.27
[edit] Resolution
Install the package of the next version. If the version on the computer is 2.5.10, install the libxml2-python 2.5.11 .
[edit] There is a lot of "NewNode: something : 0x81b8148" on the standard output
When executing METRo, there is a lot (more than 3000) of message beginning by NewNode:. Even if the execution of METRo seems succesful, this message is written.
[edit] Resolution
It is a printf left in one particular version of libxml2.
This message is a debug printf that has been left in a release of libxml2. It has been observed in libxml2 version 2.6.17.
This does not implies that METRo does an error. There is not much to do except, maybe, change the version of libxml2 if you really, really want to get rid of it. The author would suggest to get use to see it.
More information can be found here: http://mail.gnome.org/archives/xml/2003-February/msg00000.html
[edit] You've installed the python libxml2 binding, but METRo is still using PyXML
The execution of:
./metro --selftest
indicates that METRo is using PyXML, even though you've installed the python libxml2 binding:
* Initialising METRo 3.0.0 [ok] metro_xml_pyxml will be used. For better performance you can install libxml2 on your system.
[edit] Resolution
Try a different version of the python libxml2 binding. For example, I was using libxml2 version 2.6.26 and tried using the libxml2-python binding version 2.6.21. However, this did not work. In a python shell, I typed:
import libxml2
and received the following error indicating there was a problem:
Traceback (most recent call last): File "<stdin>", line 1, in ? File "libxml2.py", line 1, in ? import libxml2mod ImportError: <path>/libxml2mod.so:undefined symbol:xmlTextReaderGetParserColumnNumber
Then I tried using the libxml2-python binding version 2.6.15. The import libxml2 command worked properly and METRo started using libxml2:
* Initialising METRo 3.0.0 * Reading and validating configuration file... [ok] Configuration file:'config_libxml2.xml' loaded with success
[edit] When I want to compile, libgfortran.so.1 is not found whereas libgfortran.so.3 is installed
This problem occurs under Ubuntu 8.10. You have to be root.
[edit] Resolution
- First of all, link libgfortran.so.1 with libgfortran.so.3 in /usr/local/lib :
ln -s /usr/lib/libgfortran.so.3 /usr/local/lib/libgfortran.so.1
- then use ldconfig:
ldconfig
- As setup.sh use 'locate', update the database:
updatedb
| This page is part of the documentation of the METRo software. Back to the table of content. |
