cgoldberg/multi-mechanize — Issue #10: multimech-run causes infinite loop
Author: rgokul
Created: 2012-02-26 09:24:04+00:00
State: open

When I use multimech-run my_project I see unending stream of console output printing the number of user groups and threads. I am running on Python 2.7 32bit on Win 7 64bit.

I added the following code to the start of run.py to perform some inspection about the caller.
frm = inspect.stack()[1]
mod = inspect.getmodule(frm[0])
print frm

Here is the output:

C:\Users\c_gokulr>multimech-run my_project
(, 'C:\\Python27\\lib\\site-packages\\pkg_resources.
py', 1954, 'load', [" entry = __import__(self.module_name, globals(),glob
als(), ['__name__'])\n"], 0)
[pkg_resources] caller!

user_groups: 1
threads: 2

(, 'C:\\Python27\\lib\\site-packages\\pkg_resources.
py', 1954, 'load', [" entry = __import__(self.module_name, globals(),glob
als(), ['__name__'])\n"], 0)
[pkg_resources] caller!

user_groups: 1
threads: 2

(, 'C:\\Python27\\lib\\site-packages\\pkg_resources.
py', 1954, 'load', [" entry = __import__(self.module_name, globals(),glob
als(), ['__name__'])\n"], 0)
[pkg_resources] caller!

user_groups: 1
threads: 2

(, 'C:\\Python27\\lib\\site-packages\\pkg_resources.
py', 1954, 'load', [" entry = __import__(self.module_name, globals(),glob
als(), ['__name__'])\n"], 0)
[pkg_resources] caller!

user_groups: 1
threads: 2

(, 'C:\\Python27\\lib\\site-packages\\pkg_resources.
py', 1954, 'load', [" entry = __import__(self.module_name, globals(),glob
als(), ['__name__'])\n"], 0)
[pkg_resources] caller!

user_groups: 1
threads: 2

(, 'C:\\Python27\\lib\\site-packages\\pkg_resources.
py', 1954, 'load', [" entry = __import__(self.module_name, globals(),glob
als(), ['__name__'])\n"], 0)
[pkg_resources] caller!

user_groups: 1
threads: 2

(, 'C:\\Python27\\lib\\site-packages\\pkg_resources.
py', 1954, 'load', [" entry = __import__(self.module_name, globals(),glob
als(), ['__name__'])\n"], 0)
[pkg_resources] caller!

user_groups: 1
threads: 2

(, 'C:\\Python27\\lib\\site-packages\\pkg_resources.
py', 1954, 'load', [" entry = __import__(self.module_name, globals(),glob
als(), ['__name__'])\n"], 0)
[pkg_resources] caller!

user_groups: 1
threads: 2

(, 'C:\\Python27\\lib\\site-packages\\pkg_resources.
py', 1954, 'load', [" entry = __import__(self.module_name, globals(),glob
als(), ['__name__'])\n"], 0)
[pkg_resources] caller!
^C
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
File "", line 1, in
File "", line 1, in
File "", line 1, in
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
C:\Users\c_gokulr> File "C:\Python27\lib\multiprocessing\forking.py", line 346,
in main
File "C:\Python27\lib\multiprocessing\forking.py", line 346, in main
Traceback (most recent call last):
File "C:\Python27\lib\multiprocessing\forking.py", line 346, in main
File "", line 1, in
File "", line 1, in
File "", line 1, in
File "", line 1, in
File "C:\Python27\Scripts\multimech-run-script.py", line 8, in
File "", line 1, in
File "C:\Python27\lib\multiprocessing\forking.py", line 346, in main
File "C:\Python27\lib\multiprocessing\forking.py", line 346, in main
File "C:\Python27\lib\multiprocessing\forking.py", line 346, in main
File "C:\Python27\lib\multiprocessing\forking.py", line 346, in main
prepare(preparation_data)
prepare(preparation_data)
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 346, in main
load_entry_point('multi-mechanize==1.2.0', 'console_scripts', 'multi
mech-run')()
File "C:\Python27\lib\multiprocessing\forking.py", line 461, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 461, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 461, in prepare
prepare(preparation_data)
prepare(preparation_data)
prepare(preparation_data)
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 69, in main
prepare(preparation_data)
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 461, in pr
epare
File "C:\Python27\lib\multiprocessing\forking.py", line 461, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 461, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 461, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 461, in prepare
'__parents_main__', file, path_name, etc
'__parents_main__', file, path_name, etc
'__parents_main__', file, path_name, etc
run_test()
File "C:\Python27\Scripts\multimech-run-script.py", line 8, in
File "C:\Python27\Scripts\multimech-run-script.py", line 8, in
File "C:\Python27\Scripts\multimech-run-script.py", line 8, in
'__parents_main__', file, path_name, etc
'__parents_main__', file, path_name, etc
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 128, in run_test
'__parents_main__', file, path_name, etc
'__parents_main__', file, path_name, etc
'__parents_main__', file, path_name, etc
File "C:\Python27\Scripts\multimech-run-script.py", line 8, in
File "C:\Python27\Scripts\multimech-run-script.py", line 8, in
File "C:\Python27\Scripts\multimech-run-script.py", line 8, in
File "C:\Python27\Scripts\multimech-run-script.py", line 8, in
load_entry_point('multi-mechanize==1.2.0', 'console_scripts', 'multimech-run')()

load_entry_point('multi-mechanize==1.2.0', 'console_scripts', 'multimech-run')()

load_entry_point('multi-mechanize==1.2.0', 'console_scripts', 'multimech-run')()

File "C:\Python27\Scripts\multimech-run-script.py", line 8, in
time.sleep(.5)
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 69, in main
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multim
echanize\utilities\run.py", line 69, in main
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multim
echanize\utilities\run.py", line 69, in main
load_entry_point('multi-mechanize==1.2.0', 'console_scripts', 'multimech-run')()

load_entry_point('multi-mechanize==1.2.0', 'console_scripts', 'multimech-run')()

load_entry_point('multi-mechanize==1.2.0', 'console_scripts', 'multimech-run')()

KeyboardInterruptload_entry_point('multi-mechanize==1.2.0', 'console_scripts
', 'multimech-run')()
load_entry_point('multi-mechanize==1.2.0', 'console_scripts', 'multimech-run')()

File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 69, in main
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\mu
ltimechanize\utilities\run.py", line 69, in main
run_test()
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 69, in main

File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 69, in main
File "C:\Python27\lib\site-packages\pkg_resources.py", line 318, in load_entry
_point
run_test()
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multim
echanize\utilities\run.py", line 128, in run_test
run_test()
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-
py2.7.egg\multimechanize\utilities\run.py", line 128, in run_test
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 128, in run_test
time.sleep(.5)
return get_distribution(dist).load_entry_point(group, name)
KeyboardInterruptrun_test()
run_test()
run_test()
run_test()

File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 128, in run_test
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 128, in run_test
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 128, in run_test
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 128, in run_test
File "C:\Python27\lib\site-packages\pkg_resources.py", line 2221, in load_entr
y_point
time.sleep(.5)
time.sleep(.5)
time.sleep(.5)
time.sleep(.5)
time.sleep(.5)
time.sleep(.5)
KeyboardInterruptKeyboardInterrupt

KeyboardInterruptKeyboardInterruptKeyboardInterruptKeyboardInterrupt

return ep.load()
File "C:\Python27\lib\site-packages\pkg_resources.py", line 1954, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\utilities\run.py", line 38, in
import multimechanize.results as results
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\results.py", line 14, in
import reportwriterxml
File "C:\Python27\lib\site-packages\multi_mechanize-1.2.0-py2.7.egg\multimecha
nize\reportwriterxml.py", line 10, in
from xml.etree import ElementTree as ET
File "C:\Python27\lib\xml\etree\ElementTree.py", line 59, in
"Comment",
KeyboardInterrupt