Message9214

Author Arfrever
Recipients Arfrever
Date 2014-11-20.23:41:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1416526867.91.0.402179170694.issue2232@psf.upfronthosting.co.za>
In-reply-to
Content
java.lang.NullPointerException is raised when trying to load test suite of characteristic.
https://pypi.python.org/pypi/characteristic/14.2.0

$ jython2.7 -c 'import test_characteristic'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
java.lang.NullPointerException
        at org.python.compiler.CodeCompiler.visitLambda(CodeCompiler.java:2324)
        at org.python.antlr.ast.Lambda.accept(Lambda.java:138)
        at org.python.antlr.Visitor.visit(Visitor.java:26)
        at org.python.compiler.CodeCompiler.makeArray(CodeCompiler.java:424)
        at org.python.compiler.CodeCompiler.visitCall(CodeCompiler.java:1859)
        at org.python.antlr.ast.Call.accept(Call.java:248)
        at org.python.antlr.Visitor.visit(Visitor.java:26)
        at org.python.compiler.CodeCompiler.applyDecorators(CodeCompiler.java:542)
        at org.python.compiler.CodeCompiler.visitClassDef(CodeCompiler.java:2424)
        at org.python.antlr.ast.ClassDef.accept(ClassDef.java:236)
        at org.python.antlr.Visitor.visit(Visitor.java:26)
        at org.python.compiler.CodeCompiler.suite(CodeCompiler.java:1473)
        at org.python.compiler.CodeCompiler.visitSuite(CodeCompiler.java:1468)
        at org.python.antlr.ast.Suite.accept(Suite.java:121)
        at org.python.antlr.Visitor.visit(Visitor.java:26)
        at org.python.compiler.CodeCompiler.parse(CodeCompiler.java:317)
        at org.python.compiler.Module.codeConstant(Module.java:502)
        at org.python.compiler.Module.codeConstant(Module.java:482)
        at org.python.compiler.CodeCompiler.visitFunctionDef(CodeCompiler.java:513)
        at org.python.antlr.ast.FunctionDef.accept(FunctionDef.java:218)
        at org.python.antlr.Visitor.visit(Visitor.java:26)
        at org.python.compiler.CodeCompiler.suite(CodeCompiler.java:1473)
        at org.python.compiler.CodeCompiler.visitSuite(CodeCompiler.java:1468)
        at org.python.antlr.ast.Suite.accept(Suite.java:121)
        at org.python.antlr.Visitor.visit(Visitor.java:26)
        at org.python.compiler.CodeCompiler.parse(CodeCompiler.java:317)
        at org.python.compiler.Module.codeConstant(Module.java:502)
        at org.python.compiler.CodeCompiler.visitClassDef(CodeCompiler.java:2411)
        at org.python.antlr.ast.ClassDef.accept(ClassDef.java:236)
        at org.python.antlr.ast.Module.traverse(Module.java:128)
        at org.python.antlr.Visitor.traverse(Visitor.java:12)
        at org.python.compiler.CodeCompiler.visitModule(CodeCompiler.java:367)
        at org.python.antlr.ast.Module.accept(Module.java:121)
        at org.python.antlr.Visitor.visit(Visitor.java:26)
        at org.python.compiler.CodeCompiler.parse(CodeCompiler.java:317)
        at org.python.compiler.Module.codeConstant(Module.java:502)
        at org.python.compiler.Module.codeConstant(Module.java:482)
        at org.python.compiler.Module.compile(Module.java:656)
        at org.python.core.imp.compileSource(imp.java:330)
        at org.python.core.imp.createFromSource(imp.java:348)
        at org.python.core.imp.loadFromSource(imp.java:580)
        at org.python.core.imp.find_module(imp.java:480)
        at org.python.core.imp.import_next(imp.java:737)
        at org.python.core.imp.import_module_level(imp.java:856)
        at org.python.core.imp.importName(imp.java:946)
        at org.python.core.ImportFunction.__call__(__builtin__.java:1304)
        at org.python.core.PyObject.__call__(PyObject.java:395)
        at org.python.core.__builtin__.__import__(__builtin__.java:1257)
        at org.python.core.imp.importOne(imp.java:965)
        at org.python.pycode._pyx1.f$0(<string>:1)
        at org.python.pycode._pyx1.call_function(<string>)
        at org.python.core.PyTableCode.call(PyTableCode.java:166)
        at org.python.core.PyCode.call(PyCode.java:18)
        at org.python.core.Py.runCode(Py.java:1327)
        at org.python.core.Py.exec(Py.java:1371)
        at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:222)
        at org.python.util.jython.run(jython.java:366)
        at org.python.util.jython.main(jython.java:145)

java.lang.NullPointerException: java.lang.NullPointerException

Exception is caused by this code:

    def test_store_attributes(self):
        """
        store_attributes is called on the class to store the attributes that
        were passed in.
        """
        attrs = [Attribute("a"), Attribute("b")]

        @attributes(
            attrs, store_attributes=lambda cls, a: setattr(cls, "foo", a)
        )
        class C(object):
            pass

        assert C.foo == attrs
History
Date User Action Args
2014-11-20 23:41:08Arfreversetrecipients: + Arfrever
2014-11-20 23:41:07Arfreversetmessageid: <1416526867.91.0.402179170694.issue2232@psf.upfronthosting.co.za>
2014-11-20 23:41:07Arfreverlinkissue2232 messages
2014-11-20 23:41:06Arfrevercreate