Commit c90aadc0 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

fail without crashing

parent 5a515db1
......@@ -20,23 +20,25 @@ def calculateTags(inputDict, backend, calcUri):
backend.openContext(calcUri)
repoSect = backend.openSection("section_repository_info")
repo_dic_sub = subprocess.Popen([os.path.join(repo_base_path, 'bin/python'), base_path+'/extract_from_repo.py', rawdata_archive_path], stdin = subprocess.PIPE, stdout = subprocess.PIPE)
inputDict_str = json.dumps(inputDict)+'\n'
repo_dic_sub_out_all = repo_dic_sub.communicate(inputDict_str.encode('utf-8'))
repo_dic_sub_out = repo_dic_sub_out_all[0]
repo_dic = json.loads(repo_dic_sub_out.decode("utf-8"))
backend.addValue("repository_checksum", repo_dic['checksum'])
backend.addValue("repository_chemical_formula", repo_dic['formula'])
backend.addValue("repository_parser_id", repo_dic['prog_name'] + ' v1.0')
backend.addValue("repository_atomic_elements", repo_dic['elements'])
backend.addValue("repository_basis_set_type", repo_dic['ansatz'])
backend.addValue("repository_code_version", repo_dic['prog'].split(repo_dic['prog_name'])[0])
backend.addValue("repository_crystal_system", repo_dic['symmetry'])
backend.addValue("repository_program_name", repo_dic['prog_name'])
backend.addValue("repository_spacegroup_nr", repo_dic['ng'])
backend.addValue("repository_system_type", repo_dic['periodicity'])
backend.addValue("repository_xc_treatment", repo_dic['H_types'])
try:
repo_dic_sub = subprocess.Popen([os.path.join(repo_base_path, 'bin/python'), base_path+'/extract_from_repo.py', rawdata_archive_path], stdin = subprocess.PIPE, stdout = subprocess.PIPE)
inputDict_str = json.dumps(inputDict)+'\n'
repo_dic_sub_out_all = repo_dic_sub.communicate(inputDict_str.encode('utf-8'))
repo_dic_sub_out = repo_dic_sub_out_all[0]
repo_dic = json.loads(repo_dic_sub_out.decode("utf-8"))
backend.addValue("repository_checksum", repo_dic['checksum'])
backend.addValue("repository_chemical_formula", repo_dic['formula'])
backend.addValue("repository_parser_id", repo_dic['prog_name'] + ' v1.0')
backend.addValue("repository_atomic_elements", repo_dic['elements'])
backend.addValue("repository_basis_set_type", repo_dic['ansatz'])
backend.addValue("repository_code_version", repo_dic['prog'].split(repo_dic['prog_name'])[0])
backend.addValue("repository_crystal_system", repo_dic['symmetry'])
backend.addValue("repository_program_name", repo_dic['prog_name'])
backend.addValue("repository_spacegroup_nr", repo_dic['ng'])
backend.addValue("repository_system_type", repo_dic['periodicity'])
backend.addValue("repository_xc_treatment", repo_dic['H_types'])
except:
logging.exception("error evaluating async tags")
if repoSectUri:
backend.closeContext(repoSectUri)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment