Menu

#1636 jython error squiggle location incorrect / getParam simplification

nextrelease
open
nobody
None
5
2021-02-05
2016-07-21
No

The error squiggle location displayed for jydsCommentBug.jyds is incorrect, because it's based on the location of the simplified script used to get parameters.

See "/home/jbf/ct/hudson/script/test038/jydsCommentBug.jyds" on nudnik.physics.uiowa.edu.

  1. enter "/home/jbf/ct/hudson/script/test038/jydsCommentBug.jyds" in the address bar.
  2. this rejects, because of an error in parsing.
  3. note line 48 is highlited.
  4. the "problems indicated" droplist shows line 48.

line 48 is in the simplified script...

Discussion

  • Jeremy Faden

    Jeremy Faden - 2016-09-09

    Ivar had another case where the simplified version has a bug.

    See sftp://nudnik.physics.uiowa.edu/home/jbf/project/autoplot/bugs/1636/energy-deposition3.jyds

     
  • Jeremy Faden

    Jeremy Faden - 2016-09-09

    Here's a script that shows what Autoplot is running to get the parameters GUI:

    from org.virbo.jythonsupport import JythonUtil
    from java.io import FileReader
    d= 'file:/home/jbf/project/autoplot/bugs/1636/energy-deposition3.jyds'
    resourceURI= getParam( 'resourceURI', d, 'example file to load' )
    ss= downloadResourceAsTempFile(URL(resourceURI),monitor)
    script= JythonUtil.readScript( FileReader(ss) );
    print JythonUtil.simplifyScriptToGetParams( script, False )
    
     
  • Jeremy Faden

    Jeremy Faden - 2016-09-09
    • summary: jython error squiggle location incorrect --> jython error squiggle location incorrect / getParam simplification
     
  • Jeremy Faden

    Jeremy Faden - 2016-09-09

    I thought it might be a good idea to insert blank lines where we are skipping, so it's easier to compare with the original script.

     
  • Jeremy Faden

    Jeremy Faden - 2016-09-10

    I took out the blank lines addition, which made it harder to figure out what was going on. Actually, comments and imports should be removed, if we want to make it easier to debug. The script that saves the simplified version is very useful, and now saves the new version.

     

    Last edit: Jeremy Faden 2016-09-10
  • Jeremy Faden

    Jeremy Faden - 2020-11-14

    I've been looking at this today, and off and on for the past month on a ticket I can't find now.

     
  • Jeremy Faden

    Jeremy Faden - 2021-01-21

    check on print, I was seeing an issue with Sadie

     
  • Jeremy Faden

    Jeremy Faden - 2021-02-05

    Sadie had a script which ended in ''', which caused a strange bug when it was scraped for getParam calls. See /mynet/spot8/home/jbf/project/juno/u/sadie/20210205/Make_new_files.jy and ~/ct/hudson/script/test038/trailingStringBug.jy