dmwm / CRAB2

CRAB2
2 stars 11 forks source link

lumi_mask set but file not existing gives crash #902

Closed ericvaandering closed 10 years ago

ericvaandering commented 10 years ago

Original Savannah ticket 101356 reported by None on Mon Apr 29 09:16:30 2013.

If you have lumi_mask = MyFile.json in your crab.cfg, but the file MyFile.json is not existing, crab -create crashes [*]

It would be better to catch the exception (IOError) and provide a more readable message.

ciao, StefanoL

[*] Traceback (most recent call last): File "/home/lacaprar/scratch/CRAB/CRAB_2_86/python/crab.py", line 927, in <module> crab.initialize(options) File "/home/lacaprar/scratch/CRAB/CRAB_2_86/python/crab.py", line 181, in initialize self.initializeActions_(opts) File "/home/lacaprar/scratch/CRAB/CRAB_2_86/python/crab.py", line 521, in initializeActions ncjobs) File "/lustre/cmswork/lacaprar/CRAB/CRAB_2_8_6/python/Creator.py", line 26, in init self.createJobTypeObject(ncjobs,skip_blocks,self.isNew) File "/lustre/cmswork/lacaprar/CRAB/CRAB_2_8_6/python/Creator.py", line 75, in createJobTypeObject self.job_type = klass(self.cfg_params,ncjobs,skip_blocks,isNew) File "/lustre/cmswork/lacaprar/CRAB/CRAB_2_8_6/python/cms_cmssw.py", line 244, in init blockSites = self.DataDiscoveryAndLocation(cfg_params) File "/lustre/cmswork/lacaprar/CRAB/CRAB_2_8_6/python/cms_cmssw.py", line 396, in DataDiscoveryAndLocation self.pubdata.fetchDBSInfo() File "/lustre/cmswork/lacaprar/CRAB/CRAB_2_8_6/python/DataDiscovery.py", line 134, in fetchDBSInfo lumiList = LumiList(filename=self.lumiMask) File "/cvmfs/cms.cern.ch/slc5_amd64_gcc462/cms/cmssw/CMSSW_5_3_7/python/FWCore/PythonUtilities/LumiList.py", line 53, in init jsonFile = open(self.filename,'r') IOError: [Errno 2] No such file or directory: 'Cert_190456-199011_8TeV_PromptReco_Collisions12_JSON.txt'

ericvaandering commented 10 years ago

Comment by belforte on Mon Apr 29 09:24:26 2013

Ciao Stefano, not to sound lazy, but this seems readable enough to me:

IOError: [Errno 2] No such file or directory: 'Cert_190456-199011_8TeV_PromptReco_Collisions12_JSON.txt'

also has been like that (whatever it is) since a couple of years, what about only addressing critical issues in Crab2 at this point ?

ericvaandering commented 10 years ago

Closed by belforte on Wed Sep 11 08:03:09 2013