← Back to team overview

sikuli-driver team mailing list archive

[Question #243191]: Sikuli IDE not reappearing after script execution

 

New question #243191 on Sikuli:
https://answers.launchpad.net/sikuli/+question/243191

Hey there,

I have a script in the Sikuli IDE that, upon completion, does not bring the IDE back up. I'm running on Windows 8.

Basically, after my script runs, the IDE does not reappear but the command prompt window remains open, and I receive no errors whatsoever.

This started after I began using a logger with python.

import logging
logger = logging.getLogger('myapp')
hdlr = logging.FileHandler('C:/path-to-app/log/log.log')
formatter = logging.Formatter('%(asctime)s %(levelname)s  %(message)s', '%Y-%m-%d %H:%M:%S')
hdlr.setFormatter(formatter)
hdlr.setLevel(logging.INFO)
logger.addHandler(hdlr) 
logger.setLevel(logging.INFO)

I then have multiple instances of the following:

logger.info('Test complete')
logger.info('Step x complete')

Apart from logger.info() I don't deal with the logger anywhere else in my script. Do I need to do something like logger.shutdown(), or something like that?

Sometimes when the IDE does reappear, I get this message:

Traceback (most recent call last):
File "C:\path-to-sikuli\Sikuli\sikuli-ide.jar\Lib\logging\__init__.py", line 750, in emit
File "C:\path-to-sikuli\Sikuli\sikuli-ide.jar\Lib\logging\__init__.py", line 750, in emit
ValueError: I/O operation on closed file

I'm not very well versed with the logging process in Python so apologies in advance if it's a basic mistake I'm making.

Thanks.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.