Scripting not working on Linux with M-V 1.02Beta1

Post any questions, ideas, or topics related to Jython and Python scripting.
User avatar
bshan
Posts: 12
Joined: Tue Mar 31, 2009 5:25 pm

Scripting not working on Linux with M-V 1.02Beta1

Post by bshan »

Hi,

I have M-V 1.02Beta1 on both Linux and Mac.

The scripting on Mac seems working fine. (Both loading bundle and netcdf file)

But it is not working on Linux. I got the following message:

Error running jython script...
.
.
SyntaxError: mismatch input 'a' expecting INDENT.

Thanks
Bao
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: Scripting not working on Linux with M-V 1.02Beta1

Post by joleenf »

Bao,

How was this script transferred? It sounds like there is an error in indenting where there is a function a conditional statement.

Perhaps you could post the script?

Joleen
User avatar
bshan
Posts: 12
Joined: Tue Mar 31, 2009 5:25 pm

Re: Scripting not working on Linux with M-V 1.02Beta1

Post by bshan »

Joleen:

I just tried the simple loading bundle script. The same script is working on Mac.


setOffScreen(1)
loadBundle("/Users/bshan/test.xidv")
pause()
writeImage("/Users/bshan/testImage.png")


Thanks
Bao
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: Scripting not working on Linux with M-V 1.02Beta1

Post by joleenf »

My apology, there is nothing wrong with the indenting there.

Joleen
User avatar
Rick
Posts: 404
Joined: Fri Jan 16, 2009 8:20 pm

Re: Scripting not working on Linux with M-V 1.02Beta1

Post by Rick »

Hi Boa,

Looking at your script, it appear you may be trying to load a bundle made using IDV. Per our documentation: McIDAS-V has the ability to load and save IDV bundles (.xidv and .zidv), but all of the features between the two software packages may not be compatible, and therefore the bundles may not load properly in the other software package.

Couple of questions.

1) Was the bundle created using IDV?
2) What platform was used to create the bundle?

Can you please post your bundle and we can try loading it here.

Thanks,

Rick
User avatar
bshan
Posts: 12
Joined: Tue Mar 31, 2009 5:25 pm

Re: Scripting not working on Linux with M-V 1.02Beta1

Post by bshan »

I saved the bundle on Linux machine. and I run the script on Linux machine too.

I just found out that when I saved the bundle, there is error message:

Exception in thread "AWT-EventQueue-0" SyntaxError:("mismatched input 'a' expecting INDENT",('<string>',4,0,'a = "1";\n')).

When I run the script which will load the bundle ,I got the similar error message "Mismatched 'a' expect INDENT'".

So maybe it is not the script that is having problem, it is the "save bundle" function that is having problem.

Attached are the script, bundle and the source file.

Thanks
Bao
Attachments
test.xidv
(108.43 KiB) Downloaded 497 times
test.py
(128 Bytes) Downloaded 413 times
larc-v3.inst3_g13.201101_1745.nc
(6.36 MiB) Downloaded 427 times
User avatar
Rick
Posts: 404
Joined: Fri Jan 16, 2009 8:20 pm

Re: Scripting not working on Linux with M-V 1.02Beta1

Post by Rick »

Hi Boa,

Running the latest 1.02Beta1, I was able to get your bundle and script to work correctly. I see your bundle was created from a beta version built in April. If you could, please download the latest beta and let us know if you still have any problems.

Thanks,

Rick
User avatar
bshan
Posts: 12
Joined: Tue Mar 31, 2009 5:25 pm

Re: Scripting not working on Linux with M-V 1.02Beta1

Post by bshan »

Rick,
Thanks for looking into this.

But I created this bundle using the latest 1.02Beta on Linux this morning. And I run the script on Linux too.

The script is working correctly on Mac with 1.02Beta though.
User avatar
tomw
Posts: 296
Joined: Tue Dec 23, 2008 3:40 pm

Re: Scripting not working on Linux with M-V 1.02Beta1

Post by tomw »

Hi --

When you save the bundle and get the error message, is there the option of getting more details? (Perhaps in the log file in $HOME/McIDAS-V/mcidasv.log)

Also, do you have any formulas in your Jython library that have the statement:

a = "1"

in them?
User avatar
bshan
Posts: 12
Joined: Tue Mar 31, 2009 5:25 pm

Re: Scripting not working on Linux with M-V 1.02Beta1

Post by bshan »

My mistake. I was trying to test something from Jython Library, and I forgot to remove it afterwards.

But this time, when I saved the bundle, there is no error message.

When I run the script, I got different error message.

Java 3D warning: reported GLX version = 1.2
GLX 1.3 or higher is required
....
Java 3D ERROR : FBConfig doesn't support pbuffer or pixmap returns none.

DefaultRenderingErrorListener.errorOccured:
OFF_SCREEN_BUFFER_ERROR: Renderer : Error creating Canvas3D off-screen buffer graphicsDevice=X11GraphicsDevice[screen=0]
canvas = visad.java3d.VisADCanvasJ3D[canvas0,0,0,592x424,invalid]
Post Reply