Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Utterly baffling error message #263

Closed
itamarst opened this issue Dec 5, 2016 · 0 comments
Closed

Utterly baffling error message #263

itamarst opened this issue Dec 5, 2016 · 0 comments
Labels

Comments

@itamarst
Copy link
Contributor

itamarst commented Dec 5, 2016

If you look at ir.py you'll see this code:

class Primitive(NativeType):
    @match(many(lazy("NativeBlock"), min=1))
    def __init__(self, *blocks):
        self.blocks = blocks

If you instantiate ir.Primitive() with no arguments you'll get:

Traceback (most recent call last):
  File "/home/itamarst/Datawire/quark/quarkc/command.py", line 141, in main
    tmp_pkg = IR.load_path(ir_name)
  File "/home/itamarst/Datawire/quark/quarkc/ir.py", line 40, in load_path
    return IR.load(f.read(), source=path)
  File "/home/itamarst/Datawire/quark/quarkc/ir.py", line 46, in load
    ir_e = eval(ir_c, {}, dict((k,g[k]) for k in __all__))
  File "/home/itamarst/.quark/cache/generics.q.ir", line 1718, in <module>
    Local(LocalName('a'), Primitive(), FloatLit(0.0)),
  File "/home/itamarst/Datawire/quark/quarkc/match.py", line 439, in __call__
    return compiled.apply(self.object, *args, **kwargs)
  File "/home/itamarst/Datawire/quark/quarkc/match.py", line 182, in apply
    return state.action(*args, **kwargs)
  File "/home/itamarst/Datawire/quark/quarkc/tree.py", line 77, in __init__
    assert False, "%s is abstract base class" % self.__class__
AssertionError: <class 'quarkc.ir.Primitive'> is abstract base class

which is not helpful in debugging.

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

No branches or pull requests

1 participant