473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

IOError in windows service

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.

Jun 27 '08 #1
0 708

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob Swerdlow | last post by:
We have some users of our application getting error messages like: IOError: zipimport: can not open file /Volumes/MyApp/MyApp.app/Contents/Resources/Modules.zip This only happens on our Mac...
5
by: jkn | last post by:
Hi all Python 2.4.2 (#1, Apr 26 2006, 23:35:31) on linux2 Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "<stdin>", line 1, in...
0
by: Robert Dollinger | last post by:
Hi to everyone, I have a Service, that runs on a WinXP machine. The service read a file on a Win98 machine and write the content in a file on the WinXP machine. After tree times I get the error...
0
by: Gabriel Genellina | last post by:
En Mon, 26 May 2008 06:41:26 -0300, Aspersieman <aspersieman@gmail.comescribió: Usually services don't have a console attached so sys.stdout is invalid. Just don't print anything... --...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.