SikuliX-2014
SikuliX-2014 copied to clipboard
[error] IDE: A non-IOException-problem when trying to save null
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.
Looks like you have an extra space before wait(10). Is that just a copy-paste issue?
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).
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.