running tests [SEC=UNCLASSIFIED]

30 views
Skip to first unread message

Dunca...@ga.gov.au

unread,
Nov 21, 2011, 1:09:00 AM11/21/11
to openqu...@googlegroups.com

Hello all,

I’ve just started to look at OpenQuake.  I am doing run_tests and it is hanging, after showing several errors.  This is the main error message going to the celery screen;

 

PicklingError: Can't pickle <class 'jpype._jclass.java.lang.Exception'>: attribute lookup jpype._jclass.java.lang.Exception failed

 

 

Any ideas?

 

 

Also, this is what I get when I do openquake –version;

 

duncan@ubuntu:~/openquake$ openquake --version

Traceback (most recent call last):

  File "/usr/bin/openquake", line 61, in <module>

    from openquake import logs

  File "/usr/lib/pymodules/python2.7/openquake/logs.py", line 30, in <module>

    from celery.log import redirect_stdouts_to_logger, LoggingProxy

  File "/usr/lib/pymodules/python2.7/celery/log.py", line 219, in <module>

    setup_logging_subsystem = current_app.log.setup_logging_subsystem

  File "/usr/lib/pymodules/python2.7/celery/local.py", line 64, in __getattr__

    return getattr(self._get_current_object(), name)

  File "/usr/lib/pymodules/python2.7/kombu/utils/__init__.py", line 234, in __get__

    value = obj.__dict__[self.__name__] = self.__get(obj)

  File "/usr/lib/pymodules/python2.7/celery/app/base.py", line 414, in log

    return instantiate(self.log_cls, app=self)

  File "/usr/lib/pymodules/python2.7/celery/utils/__init__.py", line 327, in instantiate

    return get_cls_by_name(name)(*args, **kwargs)

  File "/usr/lib/pymodules/python2.7/celery/log.py", line 73, in __init__

    self.loglevel = self.app.conf.CELERYD_LOG_LEVEL

  File "/usr/lib/pymodules/python2.7/kombu/utils/__init__.py", line 234, in __get__

    value = obj.__dict__[self.__name__] = self.__get(obj)

  File "/usr/lib/pymodules/python2.7/celery/app/base.py", line 392, in conf

    return self._get_config()

  File "/usr/lib/pymodules/python2.7/celery/app/base.py", line 346, in _get_config

    return Settings({}, [self.prepare_config(self.loader.conf),

  File "/usr/lib/pymodules/python2.7/celery/loaders/base.py", line 177, in conf

    self._conf = self.read_configuration()

  File "/usr/lib/pymodules/python2.7/celery/loaders/default.py", line 36, in read_configuration

    celeryconfig = self.import_from_cwd(configname)

  File "/usr/lib/pymodules/python2.7/celery/loaders/base.py", line 74, in import_from_cwd

    self.import_module if imp is None else imp)

  File "/usr/lib/pymodules/python2.7/celery/utils/__init__.py", line 407, in import_from_cwd

    return imp(module)

  File "/usr/lib/pymodules/python2.7/celery/loaders/base.py", line 70, in import_module

    return importlib.import_module(module)

  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module

    __import__(name)

  File "/home/duncan/openquake/celeryconfig.py", line 33, in <module>

    config.abort_if_no_config_available()

AttributeError: 'module' object has no attribute 'abort_if_no_config_available'

 

 

Cheers

Duncan

Ben

unread,
Nov 21, 2011, 4:59:50 AM11/21/11
to openqu...@googlegroups.com
Hi Duncan,
It seems that your installation of OpenQuake is not correctly configured, but from the error it is difficult to say why? What operating system and version are you running OpenQuake on?
I understand that you are going to be in Pavia next month? If this is the case perhaps we could try and debug the issue when you are here, or would you prefer to begin debugging this issue immediately? Is this installation of OpenQuake on a server or a laptop, and could it be accessible from here via ssh?
Cheers, Ben

Lars Butler

unread,
Nov 21, 2011, 5:26:29 AM11/21/11
to openqu...@googlegroups.com
Hi Duncan,

It looks like you have the OQ ubuntu package installed, as well as a clone of the source code (in ~/openquake). It looks like the two are different versions and this is causing a conflict. (In general, you should either have the source or the package, not both.)

Do you want to just use OpenQuake, or are you interested in doing some development activities? If the former is true, simply try running openquake from a different directory (/home/duncan/, for example); this should do away with any config file conflicts. If you want to do some development instead, you should remove the OpenQuake package (sudo apt-get remove --purge python-oq). Please note: Since you already installed the OQ package, you already have many of the dev dependencies installed, but not all of them. You will have to install the missing packages yourself (such as python-nose).

I hope that helps.

Cheers,
-Lars

Duncan Gray

unread,
Nov 22, 2011, 12:36:50 AM11/22/11
to openqu...@googlegroups.com
Hello Ben and Lar's,
Thanks for your replies.  I am interested in doing development for OpenQuake.

I decided to start on a new VM, using Virtual Box, to have a clean OS to work with, Ubuntu 10.04 32 bit.

I followed the instructions in;
https://github.com/gem/openquake/wiki/Ubuntu-11.04

openquake --version worked.

The demonstration calculations hung though. Here's what /tmp/celeryd.log looks like;
http://pastebin.com/fAr6A9tc

Any suggestions on how to overcome this? 

Ben - I'm running OQ on a laptop, windows 7, using Virtual Box.  Thanks for the offer to ssh in.  I'm hoping you might have some suggestions so I can learn how to debug this myself.

Lars - Based on your email
sudo apt-get install python-oq
is not the appropriate way of installing OQ for development.  I plan to remove the package and get OQ from github,and see how I go with the dependencies.  Is there a web page that describes how to set up OQ this way?

Thanks for your help,
Duncan

Muharem Hrnjadovic

unread,
Nov 22, 2011, 1:06:42 AM11/22/11
to openqu...@googlegroups.com, Duncan Gray
On 11/22/2011 06:36 AM, Duncan Gray wrote:
> Hello Ben and Lar's,
> Thanks for your replies. I am interested in doing development for OpenQuake.
>
> I decided to start on a new VM, using Virtual Box, to have a clean OS
> to work with, Ubuntu 10.04 32 bit.
Hello Duncan,

Please use Ubuntu 11.04.

> I followed the instructions in;
> https://github.com/gem/openquake/wiki/Ubuntu-11.04
>
> openquake --version worked.
>
> The demonstration calculations hung though. Here's what
> /tmp/celeryd.log looks like;
> http://pastebin.com/fAr6A9tc
>
> Any suggestions on how to overcome this?
>
> Ben - I'm running OQ on a laptop, windows 7, using Virtual Box.
> Thanks for the offer to ssh in. I'm hoping you might have some
> suggestions so I can learn how to debug this myself.
>
> Lars - Based on your email
> sudo apt-get install python-oq

Please do

sudo apt-get install python-guppy python-nose python-h5py python-mock ant pyflakes pep8 pylint
sudo apt-get install python-oq

followed by

sudo apt-get remove --purge java-oq
sudo apt-get remove --purge libopenshalite-java

That installs the dependencies but removes the packaged software that we
develop ourselves. Then

cd <your-work-dir>
git clone https://github.com/gem/OpenSHA.git
cd OpenSHA
ant compile
sudo ln -s <your-work-dir>/OpenSHA/dist/opensha-lite.jar /usr/share/java/openshalite.jar

cd <your-work-dir>
git clone https://github.com/gem/openquake.git
cd openquake
ant build-openquake-jar
bin/create_oq_schema --db-name=openquake --schema-path=`pwd`/openquake/db/schema 2>&1 | tee cdb.log; grep -i error cdb.log

If all of the above goes well you are up and running.

Open terminal window 1:

cd <your-work-dir>/openquake
celeryd

Open terminal window 2:

cd <your-work-dir>/openquake
./run_tests -x

Good luck!

[..]

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

Dunca...@ga.gov.au

unread,
Nov 22, 2011, 1:21:50 AM11/22/11
to openqu...@googlegroups.com
Hello,
Oops. That was a typo. It is Ubuntu 11.04 32 bit.

Thanks Muharem

Reply all
Reply to author
Forward
0 new messages