[1.1.0] IDE can't save scripts --- should all be fixed with final 1.1.0

Bug #1447636 reported by Zeks
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Undecided
RaiMan

Bug Description

Windows 7 64 bit, latest sikuli 1.1 jar file. when trying to save scripts I get:

[error] IDE: A non-IOException-problem when trying to save null Error: null

What's interesting it does seem to save .py file, but hmtl is empty

Revision history for this message
Zeks (enmarantispam) wrote :

older version of sikuli (1.0.1) on the same machine does not have this problem

Revision history for this message
Zeks (enmarantispam) wrote :

Hm, no, actually, it persists through versions. The problem seems to arise from init/classes as none of my simple scripts ever displayed that behavior. As a test, you can try to save this text (it's a modified robot framework integration example):

I tried to see if tehre is a consistent point at which it starts to fail saving by adding/removing chunks of text but it seems to be somewhat inconsistent

from __future__ import with_statement
from sikuli import *
from sikuli.Sikuli import *
addImagePath("pdi.sikuli")
class PDI(object):

 def __init__(self):
  self.appCoordinates = (0, 0, 1920, 1080)

 def startApp(self):
  calcApp = App("PDI")
  if not calcApp.window():
    App.open("K:\\Deploy\\Arm\\release\\ARMPDI.exe");
    wait(8)
  calcApp.focus();
  wait(1)

 def verifyApp(self):
  # check application
  if exists():
   print("PASS: Calculator window appeared")
  else:
   print("FAIL: No calculator window")
   raise("FAIL: No calculator window")

    def loginApp(self):
        type(Key.ENTER)

 def runTest(self):
  self.startApp()
  self.verifyApp()

if __name__ == "__main__":
 calc = Calculator()
 calc.runTest()

Revision history for this message
Zeks (enmarantispam) wrote :

UPD: transferring the text to this editor seems to have converted tabs to lesser amount of spaces (It was 4). The version from the post earlier if posted back into IDE can be saved, but once you make tabs 4 spaces again it starts failing

Revision history for this message
RaiMan (raimund-hocke) wrote :

the content of the editor tab surely has nothing to do with the problem you get.

So please again write down step by step, what you are doing, before you get this error.

BTW: but once you make tabs 4 spaces again
What do you mean by that? What exactly are you doing?

Changed in sikuli:
status: New → Opinion
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
Revision history for this message
RaiMan (raimund-hocke) wrote :

and be sure you really use the latest build of 1.1.0 and do not mix any stuff/settings with 1.0.1 or even earlier (system path, environment variables, ....)

Revision history for this message
Glowing Crystalline Entity (glowingcrystallineentity) wrote :

I've seen this too. It seems to be that when the script has a syntax error(*), the editor won't save it. It doesn't give any hint that there's a syntax error, or where, however.

(*) or maybe only certain syntax errors related to parsing -- like mismatched comments, missing colon, commas, or parentheses, etc.

Revision history for this message
RaiMan (raimund-hocke) wrote :

@GCE
thanks again for your continued contibution.

at least after some fixes and with the final 1.1.0 any save problems should have been gone.

syntax problems cannot interfere the save process, since save is a "simple" text file write, that does not involve the interpreter.

summary: - 1.1 IDE can't save scripts
+ [1.1.0] IDE can't save scripts --- should all be fixed with final 1.1.0
Changed in sikuli:
status: Opinion → Fix Released
Revision history for this message
thedarkside (thedarksidehascookies) wrote :

it seems like syntax errors can interfere with save process!

a simple example like this will not save, and will give the following error:
[error] IDE: A non-IOException-problem when trying to save null

def x():
         print 'this will not save'
    x = 0

(using 1.1.1 (current nightly build) on ubuntu)

Revision history for this message
Erich Fiederer (erichfiederer) wrote :

Hi, I am getting this same issue with the 1.1.1 nightly from 2016-11-08. I can't figure out any workarounds and can't save any of my scripts.

Revision history for this message
Erich Fiederer (erichfiederer) wrote :

On further investigation, it looks like it DOES save the file even though it gives the error. I restart the IDE and it shows the file with the new results.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.