RaiMan / SikuliX-2014

SikuliX version 1.1.2 (until February 2018)
http://sikulix.com
805 stars 235 forks source link

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

Open kenorb opened 7 years ago

kenorb commented 7 years ago

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.

glitchassassin commented 7 years ago

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

kenorb commented 7 years ago

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 commented 7 years ago

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.