Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useless errors for incorrect "threshold" keys #145

Open
kreczko opened this issue Jul 30, 2018 · 0 comments
Open

Useless errors for incorrect "threshold" keys #145

kreczko opened this issue Jul 30, 2018 · 0 comments
Labels

Comments

@kreczko
Copy link
Member

kreczko commented Jul 30, 2018

Description

Currently, if wrong keys for thresholds are used you will see useless

Steps/code to reproduce issue

  1. Pick config, e.g. config/rates.yaml
  2. Change threshold entry JetET_BE to JetET
  3. Run cmsl1t -c config/rates.yaml -n 100

Expected results

Error signalling that JetET_BE is not defined in thresholds

Actual results

Error: Please specify thresholds in the config .yaml in dictionary format
Traceback (most recent call last):
  File "/code/bin/cmsl1t", line 212, in <module>
    analyze()
  File "/software/cmsl1t/miniconda/envs/cms/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/software/cmsl1t/miniconda/envs/cms/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/software/cmsl1t/miniconda/envs/cms/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/software/cmsl1t/miniconda/envs/cms/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/code/bin/cmsl1t", line 184, in analyze
    isok = run(config, nevents, reload_histograms)
  File "/code/bin/cmsl1t", line 128, in run
    process_tuples(config, nevents, analyzers, producers)
  File "/code/cmsl1t/utils/timers.py", line 13, in wrapper
    value = func(*args, **kwargs)
  File "/code/bin/cmsl1t", line 51, in process_tuples
    results = [analyzer.prepare_for_events(reader) for analyzer in analyzers]
  File "/code/cmsl1t/analyzers/HW_Emu_jetMet_rates.py", line 97, in prepare_for_events
    "L1 " + name, trig_thresholds, 16, 0, 80, ETA_RANGES.get(name))
  File "/code/cmsl1t/plotting/base.py", line 41, in build
    self.create_histograms(*vargs, **kwargs)
  File "/code/cmsl1t/plotting/rate_vs_pileup.py", line 25, in create_histograms
    self.thresholds = bn.GreaterThan(thresholds, "threshold", True)
  File "/code/cmsl1t/hist/binning.py", line 166, in __init__
    Base.__init__(self, len(bins), label,
TypeError: object of type 'NoneType' has no len()
@kreczko kreczko added the bug label Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant