[1.1.0] Error saving file in IDE in special situation (copy&paste code snippet)

Bug #1460616 reported by Zeks
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
High
RaiMan

Bug Description

**** the special situation
from comment #14 and #15

This happened when I ran without saving a snipped of test code in New ->Untitled tab. Then copied those code to existing saved tab. When I tried to save the existing saved tabbed with snipped of Untitled tab this happened for me.

--------------------------------------------------------------------

I have finally been able to make a minimal test case for when IDE fails to save the file:

# -*- coding: utf-8 -*-
import sys
from sikuli import *
from sikuli.Sikuli import *
sys.path.append(projectPath)

def testMessageEdit():
    assert()

               message21 = TableCell()
        FilterTable.clickMessage(message21)
        wait(2)

if __name__ == "__main__":
    testMessageEdit()

Try entering the code above in a new file and save. It will report:
[error] IDE: A non-IOException-problem when trying to save null Error: null

This happens way too often and usually in files not as obvious as this one. It is so bad that I mostly have to work in notepad++ and only run scripts from IDE.

Revision history for this message
Zeks (enmarantispam) wrote :

Oh, and I am on windows 7 64 bit, sikuli 1.1

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

I made some tests on my Win7-64 with latest build 1.1.0 - no problems found.

You should make a new setup for the IDE with tomorrows nightly build (todays' is invalid) and try again using the IDE.

Hope you do not have any non-ASCII-characters in your script paths !?

Revision history for this message
Zeks (enmarantispam) wrote :

Hmm, no. I am indeed on Russian locale, but folder paths are all in English and even contain no whitespaces. We will see what happens with tomorrow's build, if this doesn't help I will attach the file in case simple copy paste can't reproduce the problem

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

ok, to be honest:
there is a rare situation (Windows only), that I already faced myself, where it seems, that the script is not saved (the change indicator (star at the tab name) does not vanish).
... and it reports an error with reason null.

But in fact the script has been saved, as one can see, if you restart after having quitted without saving.

Revision history for this message
Zeks (enmarantispam) wrote :

Yeah, that is it. Problem is - it is not so rare for me. It happens all the time and is extremely annoying.

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

ok, then you could help me a bit by telling me the steps, before it happens:

- is it with a script, that is already open and changed?
- is it with a script, that was not open, then opened and changed?
- is it with a script, that was written from scratch and tried to save before running it the first time after IDE start?

where the scripts run before changed?

Do you have the preference switched on: more Options -> Options on Run -> autosave all?

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

BTW: with actual version of SikuliX 1.1.0 running scripts from IDE:

# -*- coding: utf-8 -*- # not needed, is standard
import sys # already imported
from sikuli import * # only needed in imported scripts, not in a main
from sikuli.Sikuli import * # wrong, do not use this anymore

sys.path.append(projectPath)

def testMessageEdit():
    assert()

               message21 = TableCell()
        FilterTable.clickMessage(message21)
        wait(2)

if __name__ == "__main__":
    testMessageEdit()

… this looks like some Excel sheet processing: why not use the xlxx_suite (bundled with version 1.1.0):
xlrd
xlwt
xlutils

… more info in the Python module index.

Revision history for this message
Zeks (enmarantispam) wrote :

This script (the one I extracted this piece from) is imported from another one that is a wrapper for robot framework.
I will try to answer your questions tomorrow

Revision history for this message
Zeks (enmarantispam) wrote :

Imported IN another one, sorry

Revision history for this message
Zeks (enmarantispam) wrote :

And no, this is not an excel sheet processing. This is a submodule testing Qt/C++ table application

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

ok, thanks for the info.

Revision history for this message
Zeks (enmarantispam) wrote :

Ok, I have tried recreating the steps and here is what I've come with:
What I did was creating a completely new script file in :

K:\SikuliX\pdi\Tests

and retyping the text in the example from first post saving after every line.
K:\SikuliX is used as sikuli home folder and runsikuli script is used from it as well.
Note that my tabs are 4 spaces and "insert whitespace in place of tabs" option is active.

I started from the beginning and when I typed
        FilterTable.clickMessage(message21)
and tried to save it it produced the error:
[error] IDE: A non-IOException-problem when trying to save null Error: null

Hope this helps to find the problem

Revision history for this message
Zeks (enmarantispam) wrote :

oh and this was done with
sikulixsetup-1.1.0-20150422.231024-47-forsetup

Revision history for this message
Chathura (chathuragune) wrote :

I am still getting this SikuliX 1.1.0 (SikulixDownloads_201510061722). This is still alloying. I just have to close the IDE and open up again when I get this annoying error.

Changed in sikuli:
status: New → Confirmed
Revision history for this message
Chathura (chathuragune) wrote :

This happened when I ran without saving a snipped of test code in New ->Untitled tab. Then copied those code to existing saved tab. When I tried to save the existing saved tabbed with snipped of Untitled tab this happened for me.

RaiMan (raimund-hocke)
summary: - Error saving files in IDE
+ [1.1.0] Error saving file in IDE in special situation (copy&paste code
+ snippet)
Changed in sikuli:
status: Confirmed → In Progress
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.1
description: updated
Changed in sikuli:
importance: Undecided → High
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.