Issues w/ subscribe/reCAPTCHA v2 on Mailman 2.1.26
Just upgraded to Mailman 2.1.26 on a CentOS 5.11 system (yeah, I know....this is a legacy box and will be migrating to a newer OS soon). I'm trying to enable reCAPTCHA v2 support. I've defined:
RECAPTCHA_SITE_KEY = '...' RECAPTCHA_SECRET_KEY = '...'
in mm_cfg.py.
I keep getting the exception shown below when testing out the subscribe function. The only way to get subscribe working again is to comment out the reCAPTCHA code in subscribe.py and commenting out RECAPTCHA_SITE_KEY and RECAPTCHA_SECRET_KEY in mm_cfg.py.
Any ideas?
TIA, Dave
===============================================
admin(5122): [----- Mailman Version: 2.1.26 -----] admin(5122): [----- Traceback ------] admin(5122): Traceback (most recent call last): admin(5122): File "/usr/local/mailman/scripts/driver", line 102, in run_main admin(5122): pkg = __import__('Mailman.Cgi', globals(), locals(), [scriptname]) admin(5122): File "/usr/local/mailman/Mailman/Cgi/subscribe.py", line 154 except urllib2.URLError as e: ^ SyntaxError: invalid syntax admin(5122): [----- Python Information -----] admin(5122): sys.version = 2.4.3 (#1, Jan 9 2013, 06:49:54) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] admin(5122): sys.executable = /usr/bin/python admin(5122): sys.prefix = /usr admin(5122): sys.exec_prefix = /usr admin(5122): sys.path = ['/usr/local/mailman/pythonlib', '/usr/local/mailman', '/usr/local/mailman/scripts', '/usr/local/mailman', '/usr/lib/python24.zip', '/usr/lib/python2.4/', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/dist-packages'] admin(5122): sys.platform = linux2
On 02/28/2018 11:01 AM, Dave Pascoe wrote:
Just upgraded to Mailman 2.1.26 on a CentOS 5.11 system (yeah, I know....this is a legacy box and will be migrating to a newer OS soon).
And the problem will be solved.
I'm trying to enable reCAPTCHA v2 support. I've defined:
RECAPTCHA_SITE_KEY = '...' RECAPTCHA_SECRET_KEY = '...'
in mm_cfg.py.
Once again, I have introduced a Python 2.7 dependency :(
For older Python versions, line 154 in Mailman/Cgi/subscribe.py which is
except urllib2.URLError as e:
needs to be
except urllib2.URLError, e:
This is now reported at <https://bugs.launchpad.net/mailman/+bug/1752658>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Dave Pascoe
-
Mark Sapiro