TypeError: __init__() takes exactly 4 arguments (6 given)

46 views
Skip to first unread message

chrisschn...@gmail.com

unread,
Jul 18, 2014, 8:26:22 AM7/18/14
to openqua...@googlegroups.com
Hey,

I try to start a hazard calculation but I get the following error message:



hao@geqm:~/Desktop/OQ_Data/oq/OQ_runs/Hazard/CARIBBEAN_LESSER_ANTILLES$ openquake --rh=caribbean.ini
[2014-07-18 14:19:45,574 hazard #17 - PROGRESS MainProcess/8489 root] **  pre_executing (hazard)
[2014-07-18 14:19:45,582 hazard #17 - PROGRESS MainProcess/8489 root] **  initializing sites
[2014-07-18 14:19:45,616 hazard #17 - PROGRESS MainProcess/8489 root] **  initializing sources
Traceback (most recent call last):
  File "/usr/bin/openquake", line 9, in <module>
    load_entry_point('openquake.engine==1.0.0', 'console_scripts', 'openquake')()
  File "/usr/lib/python2.7/dist-packages/openquake/engine/bin/oqscript.py", line 455, in main
    log_file, args.exports)
  File "/usr/lib/python2.7/dist-packages/openquake/engine/engine.py", line 565, in run_job
    job, log_level, log_file, exports, 'hazard' if hazard else 'risk')
  File "/usr/lib/python2.7/dist-packages/openquake/engine/engine.py", line 361, in run_calc
    _do_run_calc(calculator, exports, job_type)
  File "/usr/lib/python2.7/dist-packages/openquake/engine/engine.py", line 400, in _do_run_calc
    calc.pre_execute()
  File "/usr/lib/python2.7/dist-packages/openquake/engine/calculators/hazard/event_based/core.py", line 388, in pre_execute
    super(EventBasedHazardCalculator, self).pre_execute()
  File "/usr/lib/python2.7/dist-packages/openquake/engine/calculators/hazard/general.py", line 195, in pre_execute
    self.initialize_sources()
  File "/usr/lib/python2.7/dist-packages/openquake/engine/performance.py", line 120, in newmeth
    return method(self, *args)
  File "/usr/lib/python2.7/dist-packages/openquake/engine/calculators/hazard/general.py", line 235, in initialize_sources
    gsims_by_trt = make_gsim_lt(self.hc, trts).values
  File "/usr/lib/python2.7/dist-packages/openquake/engine/calculators/hazard/general.py", line 71, in make_gsim_lt
    hc.number_of_logic_tree_samples, hc.random_seed)
TypeError: __init__() takes exactly 4 arguments (6 given)




Does anybody know this error and can help me?

I assume there is something wrong in my GMPE logic tree. That is why you can find my GMPE logic tree attached.


Cheers,
Chris



gmpe_lt.xml

Michele Simionato

unread,
Jul 21, 2014, 3:40:34 AM7/21/14
to openqua...@googlegroups.com
It seems more of a version problem, like having different versions of oq-commonlib and oq-engine. But I am on vacation right now and I cannot check.

chrisschn...@gmail.com

unread,
Jul 21, 2014, 9:05:26 AM7/21/14
to openqua...@googlegroups.com
Ok but I did not change or update openquake.
Is there a easy way to fix my problem? If possible without a complete new installation.

Cheers,
Chris

Daniele Viganò

unread,
Jul 28, 2014, 4:18:34 AM7/28/14
to openqua...@googlegroups.com
Hi Chris, can I ask you the output from

sudo dpkg -l | grep python-oq

Thanks
Daniele

chrisschn...@gmail.com

unread,
Jul 29, 2014, 2:42:39 AM7/29/14
to openqua...@googlegroups.com
Dear Daniele,

this is the output:


ii  python-oq-commonlib                          0.1.0-2+dev1404342411-252f5fd                       common openquake libraries for both hazard and risk analysis.
hi  python-oq-engine                             1.0.0-2+dev1402529509-7ef6f49                       computes seismic hazard and physical risk
hi  python-oq-hazardlib                          0.11.0-1+dev1402529136-a6b1428                      hazardlib is a library for performing seismic hazard analysis
hi  python-oq-nrmllib                            0.4.5-1+dev1402529572-bcf607f                       Natural hazards' Risk Markup Language (NRML) is a collection of
hi  python-oq-risklib                            0.3.0-2+dev1402529842-300b2a5                       OpenQuake Risklib is an open source library for seismic risk


Many thanks,
Chris
Reply all
Reply to author
Forward
0 new messages