Skip to content

Instantly share code, notes, and snippets.

@neggert
Created April 26, 2012 22:40
Show Gist options
  • Save neggert/2503811 to your computer and use it in GitHub Desktop.
Save neggert/2503811 to your computer and use it in GitHub Desktop.
cms-sh|5> info run=160915
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
/afs/cern.ch/user/n/neggert/<ipython-input-5-c10902d46b4c> in <module>()
----> 1 get_ipython().magic(u'info run=160915')
/afs/cern.ch/work/v/valya/public/soft/install/lib/python2.6/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s, next_input)
1983 self._magic_locals = sys._getframe(1).f_locals
1984 with self.builtin_trap:
-> 1985 result = fn(magic_args)
1986 # Ensure we're not keeping object references around:
1987 self._magic_locals = {}
/afs/cern.ch/work/v/valya/public/soft/cmssh/src/cmssh/cms_cmds.pyc in cms_info(arg)
579 cmssh# info run=160915
580 """
--> 581 cms_ls(arg)
582
583 def cms_cp(arg):
/afs/cern.ch/work/v/valya/public/soft/cmssh/src/cmssh/cms_cmds.pyc in cms_ls(arg)
564 elif pat_run.match(arg):
565 arg = arg.replace('run=', '')
--> 566 res = run_info(arg, verbose)
567 else:
568 raise Exception('Unsupported input')
/afs/cern.ch/work/v/valya/public/soft/cmssh/src/cmssh/cmsfs.pyc in run_info(run, verbose)
396 params = {'Runs':run, 'lumiType':'delivered'}
397 data = get_data(url, method, params)
--> 398 runinfo = [r for r in runsum(run)]
399 runlumi = [r for r in data]
400 plist = []
/afs/cern.ch/work/v/valya/public/soft/cmssh/src/cmssh/runsum.pyc in runsum(run, debug)
39 url = run_summary_url(url, params)
40 key, cert = get_key_cert()
---> 41 data = get_data(url, key, cert, debug)
42 for row in xml_parser(data, 'runInfo'):
43 yield row['runInfo']
/afs/cern.ch/work/v/valya/public/soft/cmssh/src/cmssh/auth_utils.pyc in get_data(url, key, cert, debug)
81 params = urllib.urlencode(params, doseq=True)
82 url = 'https://login.cern.ch/adfs/ls/auth/sslclient/'
---> 83 fdesc = opener.open(url+'?'+params)
84 data = fdesc.read()
85 fdesc.close()
/afs/cern.ch/cms/slc5_amd64_gcc462/external/python/2.6.4/lib/python2.6/urllib2.pyc in open(self, fullurl, data, timeout)
393 for processor in self.process_response.get(protocol, []):
394 meth = getattr(processor, meth_name)
--> 395 response = meth(req, response)
396
397 return response
/afs/cern.ch/cms/slc5_amd64_gcc462/external/python/2.6.4/lib/python2.6/urllib2.pyc in http_response(self, request, response)
506 if not (200 <= code < 300):
507 response = self.parent.error(
--> 508 'http', request, response, code, msg, hdrs)
509
510 return response
/afs/cern.ch/cms/slc5_amd64_gcc462/external/python/2.6.4/lib/python2.6/urllib2.pyc in error(self, proto, *args)
431 if http_err:
432 args = (dict, 'default', 'http_error_default') + orig_args
--> 433 return self._call_chain(*args)
434
435 # XXX probably also want an abstract factory that knows when it makes
/afs/cern.ch/cms/slc5_amd64_gcc462/external/python/2.6.4/lib/python2.6/urllib2.pyc in _call_chain(self, chain, kind, meth_name, *args)
365 func = getattr(handler, meth_name)
366
--> 367 result = func(*args)
368 if result is not None:
369 return result
/afs/cern.ch/cms/slc5_amd64_gcc462/external/python/2.6.4/lib/python2.6/urllib2.pyc in http_error_default(self, req, fp, code, msg, hdrs)
514 class HTTPDefaultErrorHandler(BaseHandler):
515 def http_error_default(self, req, fp, code, msg, hdrs):
--> 516 raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
517
518 class HTTPRedirectHandler(BaseHandler):
HTTPError: HTTP Error 403: Forbidden
cms-sh|6> cp /store/data/CRUZET3/Cosmics/RAW/v1/000/050/832/186585EC-024D-DD11-B747-000423D94AA8.root .
Unable to identify total size of the file, GRID middleware fails.
Fallback to xrdcp method
Traceback (most recent call last):
File "/afs/cern.ch/work/v/valya/public/soft/cmssh/src/cmssh/cms_cmds.py", line 618, in cms_cp
status = copy_lfn(src, dst, verbose, background)
File "/afs/cern.ch/work/v/valya/public/soft/cmssh/src/cmssh/filemover.py", line 657, in copy_lfn
FM_SINGLETON.copy_via_xrdcp(lfn, dst, verbose)
File "/afs/cern.ch/work/v/valya/public/soft/cmssh/src/cmssh/filemover.py", line 487, in copy_via_xrdcp
stdout, stderr = execmd(cmd)
File "/afs/cern.ch/work/v/valya/public/soft/cmssh/src/cmssh/utils.py", line 103, in execmd
stdout = child_stdout.read()
KeyboardInterrupt
Wrong argument '/store/data/CRUZET3/Cosmics/RAW/v1/000/050/832/186585EC-024D-DD11-B747-000423D94AA8.root .'
@vkuznet
Copy link

vkuznet commented May 7, 2012 via email

@neggert
Copy link
Author

neggert commented May 7, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment