Icebox traceback reports wrong errors
Bug #1434177 reported by
Daniele Viganò
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenQuake Platform |
Fix Committed
|
High
|
Daniele Viganò |
Bug Description
Sometime the traceback that can be displayed through the icebox page contains the wrong stacktrace.
How to reproduce:
- Upload non zip file -> you get the BadZip error
- Upload a zip file with missing files (i.e. no ini) -> you get again the BadZip error instead of the real error
The Engine server log reports the true error.
Changed in oq-platform: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
The BadZip file error is
File "/usr/local/ openquake/ oq-risklib/ openquake/ commonlib/ parallel. py", line 111, in safely_call openquake/ oq-engine/ openquake/ server/ views.py" , line 99, in _prepare_job extract_ from_zip( arch, detect_job_file) openquake/ oq-risklib/ openquake/ commonlib/ readinput. py", line 102, in extract_from_zip ZipFile( path) as archive: python2. 7/zipfile. py", line 714, in __init__ _GetContents( ) python2. 7/zipfile. py", line 748, in _GetContents _RealGetContent s() python2. 7/zipfile. py", line 763, in _RealGetContents
res = func(*args), None
File "/usr/local/
return readinput.
File "/usr/local/
with zipfile.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
raise BadZipfile, "File is not a zip file"
BadZipfile: File is not a zip file
Instead of
IOError: openquake/ oq-risklib/ openquake/ commonlib/ parallel. py", line 111, in safely_call python2. 7/dist- packages/ django/ db/transaction. py", line 339, in inner openquake/ oq-engine/ openquake/ engine/ engine. py", line 474, in job_from_file get_oqparam( params, calculators= calculators) openquake/ oq-risklib/ openquake/ commonlib/ readinput. py", line 175, in get_oqparam openquake/ oq-risklib/ openquake/ commonlib/ oqvalidation. py", line 132, in __init__ from_vulnerabil ities(self. inputs) openquake/ oq-risklib/ openquake/ commonlib/ riskmodels. py", line 172, in get_imtls_ from_vulnerabil ities ty_functions( fname). items() : openquake/ oq-risklib/ openquake/ commonlib/ riskmodels. py", line 131, in get_vulnerabili ty_functions ['vulnerability Model'] ): openquake/ oq-risklib/ openquake/ commonlib/ node.py" , line 544, in read_nodes comments= remove_ comments) : openquake/ oq-risklib/ openquake/ commonlib/ node.py" , line 162, in iterparse (source, events, **kw) iterparse. __init_ _ (src/lxml/ lxml.etree. c:97327) /hazard_ PSHA/structural _vulnerability_ model.xml'
File "/usr/local/
res = func(*args), None
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/local/
oqparam = readinput.
File "/usr/local/
oqparam = OqParam(**job_ini)
File "/usr/local/
self.risk_imtls = get_imtls_
File "/usr/local/
for (imt, taxonomy), vf in get_vulnerabili
File "/usr/local/
nodefactory
File "/usr/local/
for _, el in iterparse(fname, remove_
File "/usr/local/
return etree.iterparse
File "iterparse.pxi", line 374, in lxml.etree.
IOError: [Errno 2] No such file or directory: '/tmp/tmphjbvnL
when for example an exposure file is missing