accounting information needed in scripting

Errors and unexpected results
Post Reply
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

accounting information needed in scripting

Post by joleenf »

Hi,

Could you verify that you can still list adde server information in scripting with accounting being extracted from the server manager rather than being explicitly typed in the script? I am using Version: 1.7beta1 Build-date: 2017-12-13 16:30, but had this problem with a nightly from 2017-11-01.

Joleen
User avatar
bobc
Posts: 988
Joined: Mon Nov 15, 2010 5:57 pm

Re: accounting information needed in scripting

Post by bobc »

Hi Joleen -

I quick checked this using today's nightly on Windows 7 and OS X. I was able to run scripts with loadADDEImage, listADDEImages, and listADDEImageTimes pointing to datasets on satbuf1.ssec.wisc.edu and msg.ssec.wisc.edu. I didn't include accounting information in the scripts and they worked as expected since the datasets were defined in my server manager.

Are you seeing this problem with all servers/datasets, or only certain ones?

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

Re: accounting information needed in scripting

Post by joleenf »

Hi Bob,

I am seeing this with all the servers, but I am seeing some strange messages when I try to run a script. I recently tried initializing a git repo in my jython directory. It seemed okay at the time, but I am wondering if this is the problem. I thought that it was okay to do this now (an inquiry was addressed which would allow the users to do this).

That being said, I set up a new account on a different machine, cloned my jython repository and that account seems to be running scripts without error. I am doing the same thing on that machine, using the same code, with directories appropriate to that machine.

Joleen
Attachments
mcidasv.log
(60.64 KiB) Downloaded 348 times
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: accounting information needed in scripting

Post by joleenf »

Hi Bob,

I tried the scripting option again with tempuserpath (but not filling yet with my jython code). This eliminates the problem I saw above. I also tried with userpath. I found that I was accidentally using the scripting flags incorrectly, when I typed:

Code: Select all

 ~/Applications/McIDAS-V-System/runMcV -userpath /Users/joleenf/test/ -script ~/data/goesr/goesrImg/config/sandwichIrma.py --section 'test recent'


I see an error processing arguments in my mcidasv.log

when I typed:

Code: Select all

 ~/Applications/McIDAS-V-System/runMcV -tempuserpath /Users/joleenf/test/ -script ~/data/goesr/goesrImg/config/sandwichIrma.py --section 'test recent'


A McIDAS-V session opens with no error in the log.

When I type the line correctly, the script runs for

Code: Select all

 ~/Applications/McIDAS-V-System/runMcV -userpath /Users/joleenf/test/ -script ~/data/goesr/goesrImg/config/sandwichIrma.py -scriptargs --section 'test recent'


The script runs for userpath (no python code yet in temp path), but I get JythonManager errors. I am going to have to dig further into my code. I think that the errors are coming from recent changes and I will just have to revert back to an older version. I will keep you updated if that is not the case.

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

Re: accounting information needed in scripting

Post by joleenf »

Hi Bob,

The problem was the section header from my config file. If I remove the space (test_recent rather than test recent, McIDAS-V works as expected with the code.

Joleen
User avatar
bobc
Posts: 988
Joined: Mon Nov 15, 2010 5:57 pm

Re: accounting information needed in scripting

Post by bobc »

Thanks for following up, Joleen. I'm replicating the problem of using both -tempuserpath and -script at startup on OS X (though this does work on Windows). I wrote this up as Inquiry 2615.

- Bob
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: accounting information needed in scripting

Post by joleenf »

Hi Bob,

Another consideration for that inquiry might be a warning when the user is trying to add a path when using the -tempuserpath flag. I was using the flag incorrectly, but there is no warning that a problem might occur. I wonder if it would be a good idea to issue a warning if the user is trying to enter a path value. I don't think this is a big deal if only the -tempuserflag is being used, but could be an issue if more than one flag is being used.

Joleen
User avatar
bobc
Posts: 988
Joined: Mon Nov 15, 2010 5:57 pm

Re: accounting information needed in scripting

Post by bobc »

Thanks, Joleen. This is a great point. On OS X, there's no error when trying to start up with -tempuserpath and a directory. In the terminal, you'll see that McV is starting up in a temporary directory. For example, it may say:

"Using randomly generated userpath: /var/folders/py/fcjksaofwiwof/T/mcidasv.00aptgv6"

However, most users probably wouldn't notice this since there is other text in the terminal window at startup as well. On Windows 7, you actually get an error at startup if -tempuserpath and a path are both defined. This is what should probably be happening on OS X as well to help avoid confusion.

I updated Inquiry 2615 to include this new bug.

Thanks again -
Bob
Post Reply