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

eval function bug #141

Open
KennellyT opened this issue Jun 28, 2018 · 0 comments
Open

eval function bug #141

KennellyT opened this issue Jun 28, 2018 · 0 comments

Comments

@KennellyT
Copy link

I recently installed and began to use cymetrics. I tried to receive the "ReactorEvents" metric from my database 'db'. After using the eval function cym.eval('ReactorEvents', db) to receive the 'ReactorEvents' data, this error occurred.

cym.eval('ReactorEvents', db)
Traceback (most recent call last):

File "", line 1, in
cym.eval('ReactorEvents', db)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 83, in eval
return e.eval(str(metric), conds=conds)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 55, in eval
m = self.get_metric(metric)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 47, in get_metric
self.metrics[metric] = METRIC_REGISTRYmetric

KeyError: 'ReactorEvents'

The entire code is placed below
In[20]:
db.tables
Out[20]:
{'AgentEntry',
'AgentExit',
'AgentStateAgent',
'AgentStateInventories',
'AgentState_agents_NullInstInfo',
'AgentState_agents_NullRegionInfo',
'AgentState_cycamore_EnrichmentInfo',
'AgentState_cycamore_ReactorInfo',
'AgentState_cycamore_SinkInfo',
'AgentState_cycamore_SourceInfo',
'AgentVersions',
'CommodPriority',
'Compositions',
'DecayMode',
'DecomSchedule',
'Enrichments',
'Epsilon',
'Finish',
'GreedySolverInfo',
'Info',
'InfoExplicitInv',
'InputFiles',
'MaterialInfo',
'Materials',
'NextIds',
'Prototypes',
'ReactorEvents',
'Recipes',
'ResCreators',
'Resources',
'Snapshots',
'SolverInfo',
'TimeSeriesEnrichmentFeed',
'TimeSeriesEnrichmentSWU',
'TimeSeriesPower',
'TimeSeriesUsedFuel',
'TimeStepDur',
'Transactions',
'XMLPPInfo'}

cym.eval('ReactorEvents', db)
Traceback (most recent call last):

File "", line 1, in
cym.eval('ReactorEvents', db)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 83, in eval
return e.eval(str(metric), conds=conds)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 55, in eval
m = self.get_metric(metric)

File "/home/tyler/anaconda3/lib/python3.6/site-packages/cymetric/evaluator.py", line 47, in get_metric
self.metrics[metric] = METRIC_REGISTRYmetric

KeyError: 'ReactorEvents'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant