AssertionError

37 views
Skip to first unread message

Parisa

unread,
Oct 1, 2015, 12:07:12 PM10/1/15
to OpenQuake Users
Hi,

I tried to run a hazard calculation through openquake but got stuck by this error:

oq-engine --run-hazard=/Documents/oqMine/SFSPSHA/job.ini
Traceback (most recent call last):
  File "/usr/bin/oq-engine", line 9, in <module>
    load_entry_point('openquake.engine==1.3.0', 'console_scripts', 'oq-engine')()
  File "/usr/lib/python2.7/dist-packages/openquake/engine/bin/openquake_cli.py", line 489, in main
    log_file, args.exports)
  File "/usr/lib/python2.7/dist-packages/openquake/engine/engine.py", line 353, in run_job
    hazard_calculation_id)
  File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 339, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openquake/engine/engine.py", line 429, in job_from_file
    assert os.path.exists(cfg_file_path), cfg_file_path
AssertionError: /Documents/oqMine/SFSPSHA/job.ini


I don't know how to deal with this problem, any help to solve it would be appreciated.

ps: I'm a new user of openquake or ubuntu. so please describe the procedure simply and right to the point. Tnx.
 

Daniele Viganò

unread,
Oct 1, 2015, 1:00:09 PM10/1/15
to openqua...@googlegroups.com
Dear user,


On 01/10/15 18:07, Parisa wrote:
Hi,

I tried to run a hazard calculation through openquake but got stuck by this error:

oq-engine --run-hazard=/Documents/oqMine/SFSPSHA/job.ini
Traceback (most recent call last):
  File "/usr/bin/oq-engine", line 9, in <module>
    load_entry_point('openquake.engine==1.3.0', 'console_scripts', 'oq-engine')()
  File "/usr/lib/python2.7/dist-packages/openquake/engine/bin/openquake_cli.py", line 489, in main
    log_file, args.exports)
  File "/usr/lib/python2.7/dist-packages/openquake/engine/engine.py", line 353, in run_job
    hazard_calculation_id)
  File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 339, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openquake/engine/engine.py", line 429, in job_from_file
    assert os.path.exists(cfg_file_path), cfg_file_path
AssertionError: /Documents/oqMine/SFSPSHA/job.ini
the error is telling you that the path pointing to your job.ini is wrong.

It should be:

1) a relative one (no leading slash): oq-engine --run-hazard=Documents/oqMine/SFSPSHA/job.ini
-or-
2) an absolute one (note the ~ before the slash): oq-engine --run-hazard=~/Documents/oqMine/SFSPSHA/job.ini

With option 2) '~' will be expanded by the system to the absolute path of your user home (something like /home/your_username)

Cheers,
Daniele

--
DANIELE VIGANÒ | System Administrator | Skype dennyv85 | +39 0382 5169882
GLOBAL EARTHQUAKE MODEL | working together to assess risk

Parisa

unread,
Oct 2, 2015, 7:55:45 AM10/2/15
to OpenQuake Users
Thanks a lot Dear Daniele.
Reply all
Reply to author
Forward
0 new messages