This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 161822 - NullPointerException at org.netbeans.modules.python.editor.scopes.ScopesCompiler.visitImport
Summary: NullPointerException at org.netbeans.modules.python.editor.scopes.ScopesCompi...
Status: VERIFIED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Lou Dasaro
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-03 00:58 UTC by robdaemon
Modified: 2015-12-05 13:23 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 148789


Attachments
stacktrace (2.50 KB, text/plain)
2009-04-03 00:58 UTC, robdaemon
Details
stacktrace (1.70 KB, text/plain)
2009-08-25 08:15 UTC, johnsonlau
Details
stacktrace (3.57 KB, text/plain)
2010-01-12 06:45 UTC, Exceptions Reporter
Details
stacktrace (1.83 KB, text/plain)
2010-12-12 03:46 UTC, simpatico
Details

Note You need to log in before you can comment on or make changes to this bug.
Description robdaemon 2009-04-03 00:58:09 UTC
Build: NetBeans IDE Dev (Build 200902231810)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Windows Vista, 6.1, x86

User Comments:
robdaemon: Saving a python file



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.python.editor.scopes.ScopesCompiler.visitImport(ScopesCompiler.java:356)
        at org.python.antlr.ast.Import.accept(Import.java:131)
        at org.python.antlr.Visitor.visit(Visitor.java:26)
        at org.netbeans.modules.python.editor.scopes.ScopesCompiler.suite(ScopesCompiler.java:334)
        at org.netbeans.modules.python.editor.scopes.ScopesCompiler.visitModule(ScopesCompiler.java:181)
        at org.python.antlr.ast.Module.accept(Module.java:120)
Comment 1 robdaemon 2009-04-03 00:58:14 UTC
Created attachment 79326 [details]
stacktrace
Comment 2 Exceptions Reporter 2009-06-18 20:14:11 UTC
This issue already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=148789
Comment 3 johnsonlau 2009-08-25 08:15:19 UTC
Build: NetBeans IDE Dev (Build 200908210201)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Windows XP, 5.1, x86

User Comments: 
type "import *" in source file.

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.python.editor.scopes.ScopesCompiler.visitImport(ScopesCompiler.java:356)
        at org.python.antlr.ast.Import.accept(Import.java:131)
        at org.python.antlr.Visitor.visit(Visitor.java:26)
        at org.netbeans.modules.python.editor.scopes.ScopesCompiler.suite(ScopesCompiler.java:334)
        at org.netbeans.modules.python.editor.scopes.ScopesCompiler.visitModule(ScopesCompiler.java:181)
        at org.python.antlr.ast.Module.accept(Module.java:120)
Comment 4 johnsonlau 2009-08-25 08:15:23 UTC
Created attachment 86599 [details]
stacktrace
Comment 5 Exceptions Reporter 2009-08-25 08:15:28 UTC
This issue already has 6 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=148789
Comment 6 Exceptions Reporter 2010-01-12 06:45:28 UTC
Created attachment 93217 [details]
stacktrace
Comment 7 simpatico 2010-12-12 03:46:13 UTC
Created attachment 103975 [details]
stacktrace
Comment 8 codegrabber 2011-03-08 19:55:53 UTC
Happens to me when I change from:

"from package import class" to "import package import class", with the goal of changing it to "import class"
(I had "from Mailer import *", wanted to change to "import Mailer")
Comment 9 Jenselme 2015-10-02 16:28:26 UTC
Cannot reproduce. I guess this has been fix some time ago.

Downgrading priority to P4. This should be close with the next release of nbpython.
Comment 10 Lou Dasaro 2015-11-27 20:50:39 UTC
Fixed in Python Plugin version .151118 
If you get this error, and are using NetBeans IDE 8.0.x, please upgrade to IDE 8.1 and install the latest Python plugin from the Update Center (Tools->Plugins).

If you are using NetBeans 8.1 with Python Plugin version .151118 or greater, and you receive this error, please reopen with a duplicable test case and my apologies.