Bug 151308 - Cannot run main project.
Cannot run main project.
Status: NEW
Product: python
Classification: Unclassified
Component: Projects
6.x
All All
: P2 (vote)
: 6.x
Assigned To: ardavis26
nbpythonqa
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-24 18:15 UTC by tonybeckham
Modified: 2015-09-06 05:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tonybeckham 2008-10-24 18:16:15 UTC
If you create a python project from existing sources the Run menu item "Run Main Project" is never enabled as long as
this project is set as main.

System:
Product Version: NetBeans IDE 6.5 RC2 (Build 20081024150422)
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)

Steps:
1. Create a new Python Project from Existing Sources
2. Either select next and select a source file or just select finish
3. The project will appear to be set as the main project.  You can double check by setting it as main via the menu item
Run|Set as main Project or right click on the project and select "Set as Main Project"
4. Go to the Run menu and "Run Main Project" is disabled
Comment 1 ardavis26 2008-10-28 04:38:21 UTC
After a project is created the main file needs to be set.  Open project properties and select the run panel.  Click the
browse button on the select main moddule.  Click Ok 
Comment 2 ardavis26 2008-10-28 12:33:59 UTC
I am reopening this because after giving it some thought that it should prompt you for the main file and set that before
a run if it doesn't have one.  
Comment 3 ardavis26 2008-10-29 05:59:26 UTC
added selection box on run if main file is not set in project properties
Comment 4 Peter Lam 2008-10-29 18:19:27 UTC
verified in build 120 (20081029).
Initially if no main file set, it prompts for setting the main file. However, after manually removing the main file for
the project, running it result in the following message but it did not prompt to set main file again. Reopening issue.

Traceback (most recent call last):
  (no code object) at line 0
IOError: [Errno 2] File not found - C:\Users\peter\Documents\NetBeansProjects\PythonSamples (Access is denied)
Comment 5 tonybeckham 2008-10-29 21:46:05 UTC
Also, if you rename the main file get NPE:

java.lang.NullPointerException
	at org.netbeans.modules.python.project.ui.actions.RunCommand.invokeAction(RunCommand.java:49)
	at org.netbeans.modules.python.project.PythonActionProvider$1.run(PythonActionProvider.java:70)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Comment 6 ardavis26 2008-11-03 03:16:06 UTC
I have down graded this to a p2 it's not a show stopper because you can select a main module at run.  I am working on
finding the bug about clearing the main module.  and renaming the main module will be dealt with when i look at
refactoring functions for files. 
Comment 7 Lou Dasaro 2015-09-06 05:50:57 UTC
Reset to New, since it was "Started" 7 years ago...


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo