On 2009-03-11 17:15, Oltmans wrote:
Hi, all. I'm trying to use Mechanize in a multithreaded program-- purpose of which is to fill out a form on a website using concurrent threads. Guys, trust me I've spent a lot of time to figure out the problem but I'm completed puzzled. Firstly, I've listed the errors and then the program listing (with imports omitted)
Why omit the imports?
Error: Traceback (most recent call last): File "C:\Python25\lib\threading.py", line 460, in __bootstrap self.run() File "tmechanize.py", line 21, in run with lock: NameError: global name 'lock' is not defined
The problem is in tmechanize.py, not threading.py. You forgot to actually make the lock object.
-- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list