Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > IOError in windows service

Reply
Thread Tools

IOError in windows service

 
 
Aspersieman
Guest
Posts: n/a
 
      05-26-2008
Hi all

I have a script (attached) that creates a windows service. Basically the
service periodically runs a program 'program.exe'. This all works fine,
but during testing I discovered that if I include any 'print' statements
(used to debug the service when its run in 'debug' mode), when _not_ in
debug mode, it throws an error:

<error>
The instance's SvcRun() method failed
File "C:\Python25\Lib\site-packages\win32\lib\win32serviceutil.py",
line 785, in SvcRun
self.SvcDoRun()
File "C:\Program Files\Program\MyService.py", line 28, in SvcDoRun
print "Entering while loop..."
<type 'exceptions.IOError'>: (9, 'Bad file descriptor')
</error>

I have removed the 'print' statements, after which the service runs
fine, but was just curious to find out the reason for this error.

Regards

Nicol

--

The three things to remember about Llamas:
1) They are harmless
2) They are deadly
3) They are made of lava, and thus nice to cuddle.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Temat:,Re: IOError: [Errno 22] invalid mode ('wb') or filename:in windows xp while making tarfile Tim Golden Python 6 08-25-2009 12:29 PM
Re: Temat:,Re: IOError: [Errno 22] invalid mode ('wb') or filename:in windows xp while making tarfile Dave Angel Python 0 08-24-2009 02:36 PM
IOError: [Errno 32] Broken pipe Jay Donnell Python 2 06-29-2004 12:13 AM
urllib IOError Exception Bart Nessux Python 4 06-14-2004 12:02 AM
Xerces parse aborted on IOError Jim Cobban XML 0 12-05-2003 03:26 PM



Advertisments