Skip to content

Instantly share code, notes, and snippets.

@llimllib
Last active December 12, 2015 12:19
Show Gist options
  • Save llimllib/4771030 to your computer and use it in GitHub Desktop.
Save llimllib/4771030 to your computer and use it in GitHub Desktop.
$ python -mtopaz -e "a"
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/Cellar/python/2.7.3/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/bill/code/topaz/topaz/__main__.py", line 9, in <module>
sys.exit(entry_point(sys.argv))
File "topaz/main.py", line 19, in entry_point
space = getspace()
File "topaz/main.py", line 15, in getspace
return ObjectSpace()
File "topaz/objspace.py", line 92, in __init__
self.w_class = self.getclassfor(W_ClassObject)
File "topaz/objspace.py", line 416, in getclassfor
return self.getclassobject(cls.classdef)
File "topaz/objspace.py", line 419, in getclassobject
return self.fromcache(ClassCache).getorbuild(classdef)
File "topaz/utils/cache.py", line 17, in getorbuild
builder.next()
File "topaz/module.py", line 148, in _build
filepath=classdef.filepath
File "topaz/objspace.py", line 261, in execute
bc = self.compile(source, filepath, initial_lineno=initial_lineno)
File "topaz/objspace.py", line 256, in compile
astnode.compile(ctx)
File "topaz/ast.py", line 37, in compile
self.block.compile(ctx)
File "topaz/ast.py", line 52, in compile
stmt.compile(ctx)
File "topaz/ast.py", line 67, in compile
self.expr.compile(ctx)
File "topaz/ast.py", line 353, in compile
ctx.emit(consts.LOAD_CONST, ctx.create_symbol_const(self.name))
File "topaz/astcompiler.py", line 263, in create_symbol_const
return self.create_const(self.space.newsymbol(symbol))
File "topaz/objspace.py", line 310, in newsymbol
w_sym = self.symbol_cache[symbol] = W_SymbolObject(self, symbol)
File "topaz/objects/symbolobject.py", line 12, in __init__
W_Object.__init__(self, space)
File "topaz/objects/objectobject.py", line 187, in __init__
klass = space.getclassfor(self.__class__)
File "topaz/objspace.py", line 416, in getclassfor
return self.getclassobject(cls.classdef)
File "topaz/objspace.py", line 419, in getclassobject
return self.fromcache(ClassCache).getorbuild(classdef)
File "topaz/utils/cache.py", line 17, in getorbuild
builder.next()
File "topaz/module.py", line 148, in _build
filepath=classdef.filepath
File "topaz/objspace.py", line 264, in execute
return self.execute_frame(frame, bc)
File "topaz/objspace.py", line 283, in execute_frame
return Interpreter().interpret(self, frame, bc)
File "topaz/interpreter.py", line 47, in interpret
pc = self._interpret(space, pc, frame, bytecode)
File "topaz/interpreter.py", line 66, in _interpret
pc = self.handle_bytecode(space, pc, frame, bytecode)
File "topaz/interpreter.py", line 86, in handle_bytecode
pc = self.run_instr(space, consts.BYTECODE_NAMES[instr], consts.BYTECODE_NUM_ARGS[instr], bytecode, frame, pc)
File "topaz/interpreter.py", line 109, in run_instr
res = method(space, bytecode, frame, pc, *args)
File "topaz/interpreter.py", line 510, in SEND
w_res = space.send(w_receiver, bytecode.consts_w[meth_idx], args_w)
File "topaz/objspace.py", line 475, in send
return self._send_raw(w_method, raw_method, w_receiver, w_cls, args_w, block)
File "topaz/objspace.py", line 488, in _send_raw
return raw_method.call(self, w_receiver, args_w, block)
File "topaz/objects/functionobject.py", line 64, in call
w_res = self.func(w_receiver, space, args_w, block)
File "topaz/gateway.py", line 65, in wrapper
args += (getattr(Coerce, argspec[argname])(space, args_w[arg_count]),)
File "topaz/coerce.py", line 11, in symbol
if space.is_kind_of(w_obj, space.w_symbol):
AttributeError: 'ObjectSpace' object has no attribute 'w_symbol'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment