Created
August 13, 2015 17:32
-
-
Save opotowsky/6fe3230114f3bb4c04d4 to your computer and use it in GitHub Desktop.
Cym not playing well with others
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tbl= 'Inventories' | |
cym.root_metric(name=tbl) | |
cym.exec_code("print({0}[:])".format(tbl), db) | |
--------------------------------------------------------------------------- | |
RuntimeError Traceback (most recent call last) | |
/home/opotowsky/cyclus/temp/cycamore_root_metrics.py in <module>() | |
1 tbl= 'Inventories' | |
2 cym.root_metric(name=tbl) | |
----> 3 cym.exec_code("print({0}[:])".format(tbl), db) | |
/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/execution.pyc in exec_code(code, db, write) | |
215 glb = {} | |
216 loc = ExecutionContext(evaler=evaler) | |
--> 217 exec(code, glb, loc) | |
<string> in <module>() | |
/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/execution.pyc in __getitem__(self, key) | |
132 elif isinstance(k, str_types): | |
133 conds.append(parse_cond(k)) | |
--> 134 return self.evaler.eval(self.name, conds=conds) | |
135 | |
136 | |
/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/evaluator.pyc in eval(self, metric, conds) | |
57 s = None if d is None else raw_to_series(d, dep[1], dep[2]) | |
58 series.append(s) | |
---> 59 raw = m(series=series, conds=conds, known_tables=self.known_tables) | |
60 if raw is None: | |
61 return raw | |
/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/root_metrics.pyc in __call__(self, conds, *args, **kwargs) | |
32 if self.name not in self.db.tables: | |
33 return None | |
---> 34 return self.db.query(self.name, conds=conds) | |
35 | |
36 Cls.__name__ = str(name) | |
/home/opotowsky/.local/lib/python2.7/site-packages/cymetric/cyclus.so in cymetric.cyclus._FullBackend.query (/home/opotowsky/cyclus/cymetric/build/cymetric/cyclus.cxx:2585)() | |
RuntimeError: Invalid table name Inventories |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment