Strange Queue error

Marc mnations at airmail.net
Wed Jul 24 15:20:04 EDT 2002


I was attempting to use the Queue and came across a strange error. Why
is Python wanting a Queue instance as an argument and not accepting
the tuple. I was simply trying to put this on the queue:


    qlist.put( (sleep, 5) )

Here is the error.

C:\Python22\CAP v1.0\queue>python temp2.py
Project is a go
in check
Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python22\lib\threading.py", line 408, in __bootstrap
    self.run()
  File "C:\Python22\lib\threading.py", line 396, in run
    apply(self.__target, self.__args, self.__kwargs)
  File "temp2.py", line 586, in launch
    main.launchUTStest()
  File "main.py", line 31, in launchUTStest
    eval( modules.securityFunctions[mod] )(gui, qlist)
  File "security.py", line 35, in uid_gen_format
    qlist.put( (sleep, 5) )
TypeError: unbound method put() must be called with Queue instance as
first argu
ment (got tuple instance instead)

Does anyone know what this means?

Thanks,
Marc



More information about the Python-list mailing list