[Python-bugs-list] [ python-Bugs-785584 ] urllib output: Worker thread..

SourceForge.net noreply at sourceforge.net
Sat Sep 6 17:22:15 EDT 2003

Bugs item #785584, was opened at 2003-08-08 12:59
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 

Category: Windows
Group: Python 2.3
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: mark lee smith (netytan)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib output: Worker thread..

Initial Comment:
Hi all,

I've used urlib many times before and have never got 

anything like this.. therefore i'm assuming this is a new 

thing in 2.3. because i've only been seeing this since I 

upgraded my Python version. Anyway At the end of a 

program that uses urllib.urlopen() this line appears

Worker thread [ 4291533751 ] : recieved quit event

And even if the program doesn't output anything it still 

appears, it's not really a big problem but it is very 

anoying! If somone could explain it I would much 

appreciate it.

I've attach a sample program (i've tested it with a few 

smaller programs and get the same output)



>Comment By: Brett Cannon (bcannon)
Date: 2003-09-06 16:22

Logged In: YES 

Since the string "Worker" can only be found in three comments in 

Distutils I am closing this bug as invalid.


Comment By: mark lee smith (netytan)
Date: 2003-08-19 08:02

Logged In: YES 

I get the same results as you. I have no idea where this error 

is coming form then, and I’m only getting these results from 

this box, I tested it on XP and it worked fine. No sign of the 

elusive worker thread anywhere.

Comfused but since this doesn't appear to be a problem with 

Python and more with ME I can live with it :)

Thanks for all your help guys,

Have fun,



Comment By: Christos Georgiou (tzot)
Date: 2003-08-18 04:01

Logged In: YES 

Perhaps this has to do only with your version of IDLE?  In the 

current CVS, various greps for "orker", "recieved" etc did not 

show up with something relevant.

If you are sure about the "Worker" spelling, try this script in 

your Millenium windows:

### code start

import sys, os, itertools

for dirname, dirnames, filenames in os.walk(sys.prefix):

    joiner = os.path.join.__get__(dirname)

    for filename in itertools.imap(joiner, filenames):

        data = file(filename, "rb").read()

        if "Worker" in data:

            print filename

### code end

this searches your whole python installation directory, 

for /any/ file containing the string "Worker".  A run on a 2.3b2 

install showed these files:





Comment By: mark lee smith (netytan)
Date: 2003-08-17 11:35

Logged In: YES 

The problem can also been see when running IDLE (idle.py 

intead of the idle.pyw). When you close the program 

the "worker thread" message appears in the Python window 

before it closes. My conclusion is that this error is definatly to 

do with the socket module (The version of IDLE packaged in 

2.3 uses sockets).

What chages were made to the socket module in 2.3? Also 

has anyone else knoticed this error?

Any help would be very appreciated,




Comment By: mark lee smith (netytan)
Date: 2003-08-12 16:53

Logged In: YES 

Ok I've spent allot of my free time working on this now and 

I'm pretty sure it isn't in the urllib module. The same message 

is displayed when using smtplib and sendmail. Both modules 

use the socket module, but I am not sure about searching 

that for the message since it is writen in C (A lang' i've only 

brushed with a  few times) plus i'm not sure if this has been 

changed since 2.2.. I could probably upgrade my version at 

home and see if i get the same message but i'm a little 

reluctant to do that.

Sorry cannon, I don't know much about Macs or Mac OS :)

Hope this helps, let me know what you think. Am not sure 

where to go next.



Comment By: Brett Cannon (bcannon)
Date: 2003-08-09 13:25

Logged In: YES 

If you could attempt to figure out where the message is coming 

from that would be great since I have no clue what would be 

causing it.

As for the file path thing, I was executing from my CVS directory 

with your files on my desktop so I did not have my working 

directory the same as where the script was.


Comment By: mark lee smith (netytan)
Date: 2003-08-08 23:50

Logged In: YES 

I agree with you.. I have a few box's, the error is on Windows 

me box. I havn't had the oppertunity to upgrade the version 

of Python on my XP box because it is running some fairly 

important stuff i'm working on but I plan on upgrading as soon 

as I can. I have a FreeBSD box aswell but no Python as of 

yet. My friend is running FreeBSD and doesn't see the Worker 

Thread either..

I did the same search after I posted this message yesterday 

and couldnt fine anything either. If take into account my lack 

of copying skills then that could explain the miss spelling, I 

know we do spell some words differently from american 


Thanks for the tip, as far as I'm aware if you open a file with 

just the files names then Python automatically looks in the 

same dir as the script. So i'm a little unsure why I would want 

to use an absolute file name when the file is right there :).

Thanks for your help.




Comment By: Brett Cannon (bcannon)
Date: 2003-08-08 14:21

Logged In: YES 

On my OS X machine I don't get that message.  What OS are you 

using, Mark?  If you look at urllib it does not import any threading 

module.  I ran ``egrep -r "Worker thread" *`` and it found 

nothing.  Search also failed for "recieved quit event" (which 

"recieved" is misspelled so you would think a search would turn it 

up easily).  I have a sneaking suspicion this might be platform-


Also, just a tip on opening files relative to the running code: it's 

best to make it absolute by making the path like so:

path = os.path.join(os.path.split(__file__)[0], "file.txt"))

This makes the path absolute so if people (like me) try to execute 

your script from another directory Python doesn't say it can't find 

the file you are referencing.


You can respond by visiting: 

More information about the Python-bugs-list mailing list