473,288 Members | 1,743 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,288 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 705

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: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.