← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #180346]: Timestamp in logfile

 

Question #180346 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/180346

RaiMan posted a new comment:
@ Jason
I checked the situation again with the script you sent me.

--1. script naming
A script should not be named like a module, that you are importing in the script itself. This collides with Sikuli's support for importing other Sikuli scripts.
So I first had to rename the script to something else than Logging.sikuli, to get the import logging to work at all.
You have to do this too.

--2. ValueError: I/O operation on closed file
This error happens in the __init__.py module of the logging module, when import is processed. There seems to be some bug.
Using the following sequence instead of the simple import, solves the problem:

# once at beginning of script
import logging 
reload(logging)

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