aiidateam / aiida-quantumespresso

The official AiiDA plugin for Quantum ESPRESSO
https://aiida-quantumespresso.readthedocs.io
Other
52 stars 77 forks source link

When both XML and stdout not exist: UnboundLocalError: local variable 'alat' referenced before assignment #965

Open unkcpz opened 11 months ago

unkcpz commented 11 months ago

This is not a critical issue, because in this case the workflow will failed anyway with exit_code=305. But can be better the exception is also suppressed:

Report: [100435|PwBaseWorkChain|run_process]: launching PwCalculation<100438> iteration #1                                                                                                                                                                                                
Warning: key 'symmetries' is not present in raw output dictionary                                                                                                                                                                                                                         
Critical: Traceback (most recent call last):                                                                                                                                                                                                                                              
  File "/home/jyu/Projects/WP-SSSP/aiida-quantumespresso/src/aiida_quantumespresso/parsers/parse_raw/pw.py", line 358, in parse_stdout                                                                                                                                                    
    alat *= CONSTANTS.bohr_to_ang                                                                                                                                                                                                                                                         
UnboundLocalError: local variable 'alat' referenced before assignment                                                                                                                                                                                                                     

During handling of the above exception, another exception occurred:                                                                                                                                                                                                                       

Traceback (most recent call last):                                                                                                 
  File "/home/jyu/Projects/WP-SSSP/aiida-quantumespresso/src/aiida_quantumespresso/parsers/pw.py", line 373, in parse_stdout
    parsed_data, logs = parse_stdout(stdout, parameters, parser_options, parsed_xml, crash_file)                                   
  File "/home/jyu/Projects/WP-SSSP/aiida-quantumespresso/src/aiida_quantumespresso/parsers/parse_raw/pw.py", line 382, in parse_stdout
    raise QEOutputParsingError('Parser cannot load basic info.')                                                                   
aiida_quantumespresso.parsers.QEOutputParsingError: Parser cannot load basic info.                                                 
Error: Both the stdout and XML output files could not be read or parsed.                                                                                                                                 
Warning: output parser returned exit code<305>: Both the stdout and XML output files could not be read or parsed.
Report: [100435|PwBaseWorkChain|report_error_handled]: PwCalculation<100438> failed with exit status 305: Both the stdout and XML output files could not be read or parsed.