Unable to save sikuli --- fixed with 1.1.0

Asked by Rashmi

[error] SikuliIDE: Problem when trying to invoke menu action doSave Error: null

I get the error when i try to save..Using latest 1.0.1 on wind 7

Tried reopening the ide didnot help..It was working fine before

Question information

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

--- all menu actions make this problem or only Save?

--- what did you change against "It was working fine before"?

Revision history for this message
Rashmi (rashmisn1988) said :
#2

Only save..I was able to open other files and run
Creating new file and save was also having problem

I was creating new file and was trying to save it..
Seems like it is kinda of sporadic..

now after restart and opening ide it is working fine

Revision history for this message
Aravind (a4aravind) said :
#3

Hi Raiman,

I too encountered the same one when I tried a file save operation on an already open file in the Sikuli IDE. But opening up a new file and performing a save operation works fine. But switching back again to the previous file and performing a save still yields me an error message. Not able to close the IDE as well in this scenario since the 'save all and Quit' doesn't work. I did a quit, and restarted Sikuli IDE and opened up the same file, still the same behavior.
Issue found in Sikuli 1.0.1, jdk1.6 on Win XP, 7.

Error Messages:
SAVE ->[error] SikuliIDE: Problem when trying to invoke menu action doSave Error: null
CLOSE IDE ->[error] SikuliIDE: Problem while trying to shutdown! Error: null

Thanks.

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

@Aravind
I cannot reproduce this faulty situation on my Win7-64 using either JRE 7 or JRE 6 (1.6-38)
(latest IDE (> Sept 2nd))

I tried some variations:
- IDE started with no preloaded scripts or with some
- saved changed script or unchanged script
- used menu open to open a script and the save it (changed or unchanged)
- ...

So could you pls. list the steps to reproduce

Revision history for this message
prizrakfantezi (prizrakfantezi) said :
#5

The steps:
run runIDE.cmd
open my project
edit code
try save сhanges

I think the problem with Tab.
my steps:
I localized the problem in 7 string
copy it code to notepad++
redid the indentation (set tab)
copy it to Sikuli IDE
and save it
the problem is gone

In fact some Tab were his several space in the code

Revision history for this message
Aravind (a4aravind) said :
#6

Hi Raiman,
 I've been working on it to get rid of this error. As I'm using the IDE just to take screenshots and capture Regions, I was least bothered about the alignment :(

"1378102808585.png"
"1378102826219.png"
"1378102977517.png"
"1378102987263.png"

overAllQualityReg = Region(421,279,99,23)
audioQualityReg = Region(422,306,97,27)
videoQualityReg = Region(423,335,93,24)
uploadBandwidthReg = Region(271,485,269,25)

"1378284227868.png"
Region(262,257,29,18)"1378359535932.png""1378372269249.png""1378373271232.png""1378373928081.png""1378374255185.png"
    "1378380097764.png"
   #anyOtherFeedbackReg = Region(275,528,472,76)
   "1378436582262.png"

The indentation exactly goes like the above.
I got rid of the error when I added 'a' space before "1378436582262.png" (last line) so that the indentation matches with that of the prev line

Copying the same code in a new tab and doing a save will yield the same error. Tried that too.

Revision history for this message
Aravind (a4aravind) said :
#7

@ prizrakfantezi
Exactly. Was trying to point out exactly what kind of improper indentation is raising this error. Though for any indentation issues with the actual script snippets, the IDE throwing the Python indentation error itself.

Thanks

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

@Aravind
comment #6 is not valid Python
-- if more than one expression (each image is an expression) is on one line, they have to be seperated by ;
-- in a "script like this, there generally is NO valid indentation, everything has to start in column 1 (far left)

"1378102808585.png"
"1378102826219.png"
"1378102977517.png"
"1378102987263.png"

overAllQualityReg = Region(421,279,99,23)
audioQualityReg = Region(422,306,97,27)
videoQualityReg = Region(423,335,93,24)
uploadBandwidthReg = Region(271,485,269,25)

"1378284227868.png"
Region(262,257,29,18) # this region is not accessible
"1378359535932.png";"1378372269249.png";"1378373271232.png";"1378373928081.png";"1378374255185.png"
"1378380097764.png"
#anyOtherFeedbackReg = Region(275,528,472,76)
"1378436582262.png"

instead of a ; you might use a comma, since this forms a list from the expressions (but not really recommended for that)

the best: one line - one expression (is easier to maintain too or even automate/generate)

BTW: "some text""more text" will give one string "some textmore text" (implicit concatenation) which is risky, if it is not your intention

Revision history for this message
Rashmi (rashmisn1988) said :
#9

I could see this error came again when i tried to copy code from another script from another folder(it may be due to indentation not sure!)
i was not able to save that scripts not the existing saved file,nor able to quit siluki. I forcfully quit it
reopening also had same problem

then i tried deleting registry keys for sikuli, restaring system ,IDE behaved properly

Revision history for this message
Aravind (a4aravind) said :
#10

Thanks Raiman for the detailed expln,
Anyways, I'm using Sikuli IDE only for taking screenshots and capturing regions. That's why you saw a weird script like this ;) Sorry for that.
But again, why didn't Sikuli-IDE detect this and throw an indentation error :(

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

Sikuli IDE currently only helps to add correct indentations.

Wrong indentations are currently only detected, when you run the script (give it to the interpreter).

More syntax support is on the list:
- check and correct the indentation, when script is loaded
- have a compile/syntax check button
- autocomplete and function help support

I will try to get as much as possible on the road with 1.1.0

Revision history for this message
Aravind (a4aravind) said :
#12

Thanks a lot, Raiman

Revision history for this message
Vyacheslav Kolesnik (uzb310) said :
#13

I've same issue.
However I've fixed it by hack in regedit
the following value
 HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org\sikuli\basics
/A/T_/S/A/V/E_/M/A/K/E_/H/T/M/L
need be changed to false and restart IDE
so saving issue has gone

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

@Vyacheslav:
for version 1.0.1+ you can switch off the creation of the .html file in the Preferences -> …more options

No need to tweak the registry for that ;-)

Revision history for this message
eduardobedoya (gonnabdh) said :
#15

Hi Raiman, why is the creation of the html on save need for?? Thanks Advanced.

Revision history for this message
zak_ubuntu (zakariyamp) said :
#16

Dear All,
I had the same issue and found the problem with comments (''') only. I was trying to break the comments into multiple for different blocks and working properly. Generally I understand it is an indenting issue.

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

All these symptoms should have vanished with 1.1.0+.

Can you help with this problem?

Provide an answer of your own, or ask Rashmi for more information if necessary.

To post a message you must log in.