" parms[n] = str(v) if not isinstance(v, str) else v\n",
" if parms[n] == \"None\" or parms[n] == \"'None'\":\n",
" parms[n] = None"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Failed for const RelativeGain of Q2M1: Error sending to database: {'reason': '\\'NoneType\\' object has no attribute \\'get\\': File \"/gpfs/exfel/data/scratch/haufs/karabo-2.2.1/karabo/devices/calibrationDbRemote/src/calibrationDBRemote/calibration_db_remote.py\", line 373, in zmq_server_runner\\n krb_ccv)\\n File \"/gpfs/exfel/data/scratch/haufs/karabo-2.2.1/karabo/devices/calibrationDbRemote/src/calibrationDBRemote/calibration_karabo.py\", line 53, in get_calib_const_version_file\\n file_name_abs_url = \\'{0}{1}\\'.format(ccv_krb_h.get(\\'hdf5path\\'),\\n', 'success': False}\n"
print("Failed for const {} of {}: {}".format(const,qm,e))
ofile.close()
```
%% Output
Failed for const RelativeGain of Q2M1: Error sending to database: {'reason': '\'NoneType\' object has no attribute \'get\': File "/gpfs/exfel/data/scratch/haufs/karabo-2.2.1/karabo/devices/calibrationDbRemote/src/calibrationDBRemote/calibration_db_remote.py", line 373, in zmq_server_runner\n krb_ccv)\n File "/gpfs/exfel/data/scratch/haufs/karabo-2.2.1/karabo/devices/calibrationDbRemote/src/calibrationDBRemote/calibration_karabo.py", line 53, in get_calib_const_version_file\n file_name_abs_url = \'{0}{1}\'.format(ccv_krb_h.get(\'hdf5path\'),\n', 'success': False}