SikuliX-2014 icon indicating copy to clipboard operation
SikuliX-2014 copied to clipboard

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

Open kenorb opened this issue 8 years ago • 3 comments

This happened to my once on macOS. When trying to save the code, this error is shown:

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

and the file isn't saved. Re-opening file didn't help, either restarting the editor.

The affected code:

class Test():
    img_x = "X.png"

    def __init__(self, app_name = "Screen Sharing"):
        self.app = App(app_name)
        self.focus()
        self.region = Region(App.focusedWindow())

    def foo(self):
        if self.region.exists(self.img_x):
            self.region.doubleClick(self.img_x)
         wait(10)

Basically the code doesn't want to be saved and the editor generates the above error preventing saving the file. Commenting out wait(10) seems to help. I think the file should be saved, no matter what are the code syntax problems.

kenorb avatar Jun 01 '17 15:06 kenorb

Looks like you have an extra space before wait(10). Is that just a copy-paste issue?

glitchassassin avatar Jun 01 '17 15:06 glitchassassin

Yes, that's correct, my mistake. Is prevent saving the file on syntax error expected? I think it should show at least some error where the problem is (better error handling).

kenorb avatar Jun 01 '17 15:06 kenorb

I think I've seen this warning:

[error] PythonIndentation: indent not consistent with tab settings in line 62

but somehow it's not displayed when trying to save above file. This should be the right error to show.

kenorb avatar Jun 01 '17 15:06 kenorb