Issue 785584: urllib output: Worker thread.. (original) (raw)

Created on 2003-08-08 19:59 by netytan, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fetch-headlines.zip netytan,2003-08-08 19:59
Messages (9)
msg17682 - (view) Author: mark lee smith (netytan) Date: 2003-08-08 19:59
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) Mark.
msg17683 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2003-08-08 21:21
Logged In: YES user_id=357491 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- specific. 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.
msg17684 - (view) Author: mark lee smith (netytan) Date: 2003-08-09 06:50
Logged In: YES user_id=797196 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 english. 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. Mark.
msg17685 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2003-08-09 20:25
Logged In: YES user_id=357491 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.
msg17686 - (view) Author: mark lee smith (netytan) Date: 2003-08-12 23:53
Logged In: YES user_id=797196 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. Mark.
msg17687 - (view) Author: mark lee smith (netytan) Date: 2003-08-17 18:35
Logged In: YES user_id=797196 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, Thanks, Mark.
msg17688 - (view) Author: Χρήστος Γεωργίου (Christos Georgiou) (tzot) * Date: 2003-08-18 11:01
Logged In: YES user_id=539787 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: C:\PY.23\Lib\distutils\bcppcompiler.py C:\PY.23\Lib\distutils\ccompiler.py C:\PY.23\Lib\distutils\msvccompiler.py
msg17689 - (view) Author: mark lee smith (netytan) Date: 2003-08-19 15:02
Logged In: YES user_id=797196 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, Mark.
msg17690 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2003-09-06 23:22
Logged In: YES user_id=357491 Since the string "Worker" can only be found in three comments in Distutils I am closing this bug as invalid.
History
Date User Action Args
2022-04-10 16:10:33 admin set github: 39036
2003-08-08 19:59:31 netytan create