You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, any call to outside commands (e.g. hadoop) uses subprocess.check_call. This has the upside of quitting when the command fails, but the downside of producing an unhelpful error message:
subprocess.CalledProcessError: Command '['hadoop', 'fs', '-copyFromLocal', '-f',
'/condor/condor/dir_654123/scratch/workspace/results/ntuple_55.root',
'/TopQuarkGroup/phxlk/ntuple/v0.0.1/Spring16/SingleElectron_Run2016B_PromptReco/SingleElectron_Run2016B_PromptReco/job_55/ntuple_55.root']'
returned non-zero exit status 1
It also doesn't integrate well with the logging module. And sometimes you don't want it to quit, just print the error message and carry on (e.g. post-running file transfer).
Currently, any call to outside commands (e.g.
hadoop
) usessubprocess.check_call
. This has the upside of quitting when the command fails, but the downside of producing an unhelpful error message:It also doesn't integrate well with the
logging
module. And sometimes you don't want it to quit, just print the error message and carry on (e.g. post-running file transfer).Suggestion from @kreczko: https://github.com/kreczko/NTupleProduction/blob/Spring16/python/ntp/interpreter.py#L283
NB to retain Python2.6 compatibility (the default on soolin), we can't use
subprocess.check_output
😦The text was updated successfully, but these errors were encountered: