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 155707 - running sample app PLYDemo throws NPE
Summary: running sample app PLYDemo throws NPE
Status: VERIFIED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Projects (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: ardavis26
URL:
Keywords:
: 155790 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-17 21:01 UTC by Peter Lam
Modified: 2009-02-19 22:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lam 2008-12-17 21:01:40 UTC
With the latest build 20081217-381, create the PLYDemo sample project, right click and select Run. The following
exception popped up. 


java.lang.NullPointerException
	at org.netbeans.modules.python.project.ui.actions.RunCommand.invokeAction(RunCommand.java:48)
	at org.netbeans.modules.python.project.PythonActionProvider$1.run(PythonActionProvider.java:70)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)
Comment 1 Peter Lam 2008-12-17 21:21:56 UTC
Workaround:
- select tokenizer.py for Main Module from the project Properties

Then, the project can be run but the following error occurred using the default python platform runtime from the sample
project.

Traceback (most recent call last):
  File "C:\Users\peter\Documents\NetBeansProjects\PLYDemo-PythonSample3\src\tokenizer.py", line 50, in <module>
    import ply.lex as lex
ImportError: No module named ply.lex
Comment 2 Peter Lam 2008-12-17 23:22:05 UTC
In order to run this project, an external module "PLY" should be installed in the python installation. PLY can be
downloaded from http://www.dabeaz.com/ply/

The original problem in this issue is still valid that the default Main Module should be changed to tokenizer.py to work.
Comment 3 ardavis26 2008-12-18 19:13:08 UTC
*** Issue 155790 has been marked as a duplicate of this issue. ***
Comment 4 tonybeckham 2009-01-07 00:07:57 UTC
Default run file has been changed to tokenizer.py but user must still set python version to Python instance not default
jython.  This could be added to the readme.

System:
Build 528
Product Version: NetBeans IDE Dev (Build 20090106142255)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
System: Mac OS X version 10.5.5 running on i386; MacRoman; en_US (nb)
Comment 5 amitksaha 2009-01-07 03:43:33 UTC
Fixed in http://hg.netbeans.org/main/rev/5cbf471f0c8d.
Comment 6 Peter Lam 2009-01-10 04:37:00 UTC
verified in build 20090108