Can't run scripts in Netbeans IDE

Asked by Beth Griffin

I had been working just fine at home in the Netbeans IDE on a netbeans jython/sikuli project, when suddenly (well okay, I've been tweaking settings, I just don't recall which ones):

- Save file(s)
- Build
- Debug project

In the Debugging <file> window:

[LOG]PythonDebugger : overall Starting
[LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ...
[LOG]This window is an interactive debugging context aware Python Shell
[LOG]where you can enter python console commands while debugging
\Sikuli was unexpected at this time.
Debug session Abort =255
>>>

I've been getting the same thing at work from the beginning, and just living with it, but I'd like to fix this, especially now that BOTH my configurations do it :-(

In either instance, I have no problems running these same modules via Sikuli X, it seems to be something to do with my configuration/preferences set in Netbeans.

What should I be looking at?

Thanks,
Beth

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Beth Griffin
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

In my configuration I have added under Tools -> Python Platforms

C:\Program Files\Sikuli X\sikuli-script.jar\Lib to Pythonpath and
C:\Program Files\Sikuli X\sikuli-script.jar to Javapath

and I do not have this effect.

In the script itself only the additional
from sikuli.Sikuli import *
is needed

So if you have something else, this might be the problem.

Have a look at /your-home-dir/.netbeans/6.9/build.properties (the global property file).

the following 2 entries are relevant:
pythonplatform.default.pythonlib=
pythonplatform.default.javalib=

Be aware, that the filenames must contain \\ (double backslashes) if you edit this file.

Revision history for this message
Beth Griffin (beth-griffin) said :
#2

I've check the path settings so many times. That isn't the cause. I was playing with Netbeans Tools->Options and changed something under Editor Hints, and I suspect one of them is the cause. At home, I never had this problem until I changed the Editor Hits for Python.

Revision history for this message
Beth Griffin (beth-griffin) said :
#3

These are all the pythonplatform lines in the build.properties file.

pythonplatform.default.args=
pythonplatform.default.console=C:\\Users\\bgriffin.AMD\\.netbeans\\6.9\\jython-2.5.1\\bin\\jython.bat
pythonplatform.default.interpreter=C:\\Users\\bgriffin.AMD\\.netbeans\\6.9\\jython-2.5.1\\bin\\jython.bat
pythonplatform.default.javalib=C:\\Users\\bgriffin.AMD\\.netbeans\\6.9\\jython-2.5.1\\jython.jar;C:\\Program Files (x86)\\Sikuli X\\sikuli-script.jar
pythonplatform.default.name=Jython 2.5.1
pythonplatform.default.pythonlib=C:\\Users\\bgriffin.AMD\\.netbeans\\6.9\\jython-2.5.1\\Lib;C:\\Users\\bgriffin.AMD\\.netbeans\\6.9\\jython-2.5.1\\Lib\\site-packages;C:\\Program Files (x86)\\Sikuli X\\sikuli-script.jar\\Lib;C:\\Program Files (x86)\\Sikuli X\\sikuli-script\\Lib

I have enabled in Editor Hints:

(General)
Symbol defined in __all__ does not exist
Assign expression to a value
Fin Unused Imports
Multiple import per import statement is discouraged
Parent Child circular redundancy
Create document comment
Naming Conventions
Relative imports for intra-package imports are active
Find Unresolved classes attributes and parentages
Deprecated
Attribute Defined Outside __init__
Find Unused Variables
Find Undefined Names
(Selection Hints)
Extract Code
Surround With

Revision history for this message
RaiMan (raimund-hocke) said :
#4

Must be something else.

I set up the same configuration as you have - no problems.

The only difference: you are running Sikuli X 32Bit on a Win7 64Bit system (mine is 32Bit).

Revision history for this message
Beth Griffin (beth-griffin) said :
#5

At work, I'm 64bit, home is 32bit. Like I said, the 32bit system used to work, then I changed the settings.

I'm working on a library for test automation. Right now, I create a sikuli project that imports my library, and debug it using the Sikuli X IDE, but would like to get back to the Netbeans IDE working.

Where are the netbeans preferences recorded? I've looked in .netbeans, .nbi, and .netbeans-registration, no luck.

Revision history for this message
RaiMan (raimund-hocke) said :
#6

sounds all really strange.

did you ever just run an empty script with the debugger and then another one that only contains from sikuli.sikuli import * ?

If this does not give any hints, I think you should purge/uninstall the whole Python stuff in Netbeans and start allover again with a new plugin install.

BTW: I do not know either, where they hide all this preference stuff.

Revision history for this message
Beth Griffin (beth-griffin) said :
#7

So, I created a brand new Python project. It created the setup.py and a testnetbeans.py. Didn't make any changes and tried to run with testnetbeans.py as "main" (yes it has the if __name__...). I got the error. No "from sikuli..." in the file anywhere. Nothing printed out.

I have already deinstalled and reinstalled Java, Netbeans, and Sikuli so many times now. If I could wipe out the Application Data and registry stuff, if might help, but I can't do that with my office machine, they've set some domain security policies pretty tight. There are things I can't do, even though I am in group Administrators.

Revision history for this message
Beth Griffin (beth-griffin) said :
#8

One more bit of info:

If I remove all Sikuli path data from the Tools->Python Platforms (Python Path, Java Path), the empty project prints "Hello World". With Sikuli in the paths, the error.

Revision history for this message
RaiMan (raimund-hocke) said :
#9

I did not mention this until now:

Jython 2.5.1 has some problems in different areas with pathnames that contain blanks.

So give this a try:

copy sikuli-script.jar to a place, where the pathname does not contain blanks.

put this into the python and java path (the unjared Lib folder is not needed for this test), and run these tests again.

Revision history for this message
Beth Griffin (beth-griffin) said :
#10

So, with "C:\Users\bgriffin\Desktop\sikuli-script.jar\Lib" and "C:\Users\bgriffin\Desktop\sikuli-script.jar" for Python and Java path additions, it worked. Okay, so the issue is the spaces in the file paths.

Thanks,
Beth