python-oq installation issue

62 views
Skip to first unread message

Lars Butler

unread,
May 2, 2012, 4:24:04 AM5/2/12
to openqu...@googlegroups.com
An OpenQuake user has reported an issue installing the latest python-oq package. This is the error he gets when trying to install the package:

mariomarques@mariomarques-desktop:~$ sudo apt-get remove python-oq
[sudo] password for mariomarques: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  vim-gui-common libruby1.8 libreadline5
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  python-oq
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 2,519 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 241645 files and directories currently installed.)
Removing python-oq ...
Processing triggers for python-support ...





mariomarques@mariomarques-desktop:~$ sudo apt-get install python-oq
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  vim-gui-common libruby1.8 libreadline5
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  python-oq
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/488 kB of archives.
After this operation, 2,519 kB of additional disk space will be used.
Selecting previously deselected package python-oq.
(Reading database ... 241304 files and directories currently installed.)
Unpacking python-oq (from .../python-oq_0.6.1-7_all.deb) ...
Setting up python-oq (0.6.1-7) ...
 * Restarting PostgreSQL 9.1 database server                             [ OK ] 
dpkg: error processing python-oq (--configure):
 subprocess installed post-installation script returned error exit status 3
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 python-oq
E: Sub-process /usr/bin/dpkg returned an error code (1)


mariomarques@mariomarques-desktop:~$ openquake --version
Traceback (most recent call last):
  File "/usr/bin/openquake", line 73, in <module>
    from openquake.utils import config
ImportError: No module named openquake.utils


---------- Forwarded message ----------
From: Mario <marma...@gmail.com>
Date: Mon, Apr 30, 2012 at 7:33 PM
Subject: Re:
To: Lars Butler <lars....@gmail.com>


Hi Lars,

I'm sending now the new output, after having removed and installed the python-oq.
I think it's not working yet but please check if I'm wrong.

Thank you.
Cheers,
Mário


On 04/30/2012 09:46 AM, Lars Butler wrote:
Hmm, it looks like the openquake package did not get installed properly/fully. I would advise trying this:

$ sudo apt-get remove python-oq
$ sudo apt-get install python-oq

Try that, then try $ openquake --version, like before. If it's still not working, copy and paste the output of the installation commands and any new errors which appear.

Thanks,
-Lars

On Sun, Apr 29, 2012 at 5:15 PM, Mario <marma...@gmail.com> wrote:
Hi Lars,

Sorry for not having replied yet but I was out of office.
Attached you can find the output print using the two shell commands you ask me to.

I am a recent Ubuntu user and hope this error wasn't because of my misunderstanding.

Cheers,
Mário




On 04/27/2012 09:30 AM, Lars Butler wrote:
Hi Mario,

I can't immediately think of the root cause. Can you run the following two shell commands and paste the output of each for me? (If there's a lot of output, it would be best to use pastebin.com.)

$ env
$ python -c "import openquake; print openquake.__file__"

Please send the output to me and I'll have a better idea of what is wrong.

Cheers,
-Lars

On Thu, Apr 26, 2012 at 9:02 PM, Mario <marma...@gmail.com> wrote:

Dear Lars Butler,

I tried to install OpenQuake in my machine (Ubuntu 11.10), and I've
followed each of the following steps:

1- Install the OpenQuake package

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:openquake/ppa
sudo apt-get update
sudo apt-get install python-oq

2- I've edited with gedit the /.bashrc file adding the following lines
to the end of the file

echo "export MPLCONFIGDIR=/tmp
echo "export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/jre">>   $HOME/.bashrc
echo 'export DJANGO_SETTINGS_MODULE="openquake.settings"'>>   $HOME/.bashrc

3- I've tried to verify the version with

openquake --version

4- The following message appeared when I did the previous step

ImportError: No module named openquake.utils

I have no idea of what's gone wrong and what I can do to make it works.
Thank you for your help.

Best regards,
Mário Marques









Muharem Hrnjadovic

unread,
May 2, 2012, 4:35:08 AM5/2/12
to openqu...@googlegroups.com, Lars Butler, Damiano Monelli
I apologise for this issue, a new python-oq package that rectifies
matters should be available in approx. 2 hours:
https://launchpad.net/~openquake/+archive/ppa/+build/3456569
>> On Sun, Apr 29, 2012 at 5:15 PM, Mario <marma...@gmail.com <mailto:marma...@gmail.com>> wrote:
>>
>> Hi Lars,
>>
>> Sorry for not having replied yet but I was out of office.
>> Attached you can find the output print using the two shell commands you ask me to.
>>
>> I am a recent Ubuntu user and hope this error wasn't because of my misunderstanding.
>>
>> Cheers,
>> Mário
>>
>>
>>
>>
>> On 04/27/2012 09:30 AM, Lars Butler wrote:
>>> Hi Mario,
>>>
>>> I can't immediately think of the root cause. Can you run the following two shell commands and paste the output of each for me? (If there's a lot of output, it would be best to use pastebin.com <http://pastebin.com>.)
Best regards/Mit freundlichen Grüßen

--
Muharem Hrnjadovic <m...@foldr3.com>
Public key id : B2BBFCFC
Key fingerprint : A5A3 CC67 2B87 D641 103F 5602 219F 6B60 B2BB FCFC

signature.asc

Mohamed El-Gabry

unread,
May 2, 2012, 6:15:02 AM5/2/12
to openqu...@googlegroups.com
hii.
trying to run MTK I got this erorr
READ_EQ_CATALOG

Traceback (most recent call last):
File "main.py", line 55, in <module>
WORKFLOW.start(CONTEXT, CATALOG_FILTER)
File "/home/elgabry/tunis/MTK/mtoolkit/workflow.py", line 250, in start
self.preprocessing_pipeline.run(context)
File "/home/elgabry/tunis/MTK/mtoolkit/workflow.py", line 96, in run
job(context)
File "/home/elgabry/tunis/MTK/mtoolkit/jobs.py", line 55, in wrapper
job(context)
File "/home/elgabry/tunis/MTK/mtoolkit/jobs.py", line 69, in read_eq_catalog
context.eq_catalog = reader.read_eq_catalog()
File "/home/elgabry/tunis/MTK/mtoolkit/eqcatalog.py", line 162, in
read_eq_catalog
for eq_entry in self.read():
File "/home/elgabry/tunis/MTK/mtoolkit/eqcatalog.py", line 147, in read
if not self.check_map[field](field, eq_entry)\
KeyError: '10'

salam
Mohamed
--
*******************************
Mohamed Nabil El-Gabry
National Research Institute of Astronomy and
Geophysics, NRIAG, Elmarsad St., Helwan, Cairo, Egypt
Postal no.: 11421
Tel(office) : +202-25549708 (Ext: 290)
Fax : +202-25548020
Tel(mobile): +2 0105850033
*******************************

Giuseppe Vallarelli

unread,
May 2, 2012, 8:41:24 AM5/2/12
to OpenQuake Developers
Hi Mohamed thanks for your report,
reading your error, it seems that you provided an input earthquake
catalogue
not valid for the oq-hazard-modeller, specifically we are not using
any '10' as a fieldname. Here you can find an example of a valid
earthquake catalogue:
https://raw.github.com/gem/oq-hazard-modeller/master/tests/data/ISC_correct.csv
As you can see from the example file you need to specifiy fieldnames
on the first line.

Thanks again,
Giuseppe

Giuseppe Vallarelli

unread,
May 2, 2012, 8:52:11 AM5/2/12
to OpenQuake Developers
Hi Mohamed,
I forgot to add this link http://docs.openquake.org/mtoolkit/index.html
perhaps you could find this useful.

cheers,
Giuseppe

On May 2, 2:41 pm, Giuseppe Vallarelli <giuse...@openquake.org> wrote:
> Hi Mohamed thanks for your report,
> reading your error, it seems that you provided an input earthquake
> catalogue
> not valid for the oq-hazard-modeller, specifically we are not using
> any '10' as a fieldname. Here you can find an example of a valid
> earthquake catalogue:https://raw.github.com/gem/oq-hazard-modeller/master/tests/data/ISC_c...
Reply all
Reply to author
Forward
0 new messages