Start up failing with ZopeCtlOptions instance has no attribute 'transcript'
Sebastian Tänzer <st-QH+HwckL5+RBDLzU/[email protected]> Wed, 1 Apr 2015 12:37:06 +0200
| Newsgroups | gmane.comp.web.zope.general |
|---|---|
| Message-ID | <[email protected]> |
Hello all,
latest Zope2 releases (2.13.23.dev0) seem top have a bug in Zope2/Startup/zopectl.py and zdaemon/zdctl.py leading to this error on zopectl start (zopectl fg works fine):
Traceback (most recent call last):
File "/opt/python/zope2/bin/zopectl", line 9, in <module>
load_entry_point('Zope2==2.13.23.dev0', 'console_scripts', 'zopectl')()
File "/opt/python/zope2/lib/python2.7/site-packages/Zope2/Startup/zopectl.py", line 488, in run
exitstatus = main()
File "/opt/python/zope2/lib/python2.7/site-packages/Zope2/Startup/zopectl.py", line 447, in main
c.onecmd(" ".join(options.args))
File "/opt/python/2.7.9/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "/opt/python/zope2/lib/python2.7/site-packages/Zope2/Startup/zopectl.py", line 241, in do_start
ZDCmd.do_start(self, arg)
File "/opt/python/zope2/lib/python2.7/site-packages/zdaemon/zdctl.py", line 305, in do_start
args += self._get_override("-t", "transcript")
File "/opt/python/zope2/lib/python2.7/site-packages/Zope2/Startup/zopectl.py", line 223, in _get_override
value = getattr(self.options, name)
AttributeError: ZopeCtlOptions instance has no attribute 'transcript'
I repeated my setup multiple times and was able to reproduce this every time with every setup, so I don't think this is a configuration error on my side (yet if it is please tell me what might be wrong). Zope2 was installed using a simple pip install Zope2. Imho this bug comes up as in Startup/zopectl.py" the ZopeCtlOptions class is beeing emulated but so. missed the transcript attribute (as before this happend with the startup-time attribute, too).
I created a patch that's attached to this mail and should be run inside the virtualenv python dir (i.e. where bin, include, lib etc. reside):
patch -p0 < patch-zope2-startup.diff
Maybe someone could confirm that this bug exists and this fixes it?
Best
Sebastian
-
tänzermedien GmbH - Agentur für Online-Medien
Kekuléstr. 39 | 53115 Bonn, Germany
E-Mail: st-QH+HwckL5+RBDLzU/[email protected] | Web: http://www.taenzer.me
Tel.: 0228-304134-0 | Fax.: 0228-304134-99
_______________________________________________
Zope maillist - [email protected]
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
patch-zope2-startup.diff
(application/octet-stream, 1.4 KB)
--- lib/python2.7/site-packages/zdaemon/zdctl.py 2015-04-01 01:13:05.985540001 +0200
+++ lib/python2.7/site-packages/zdaemon/zdctl.py 2015-04-01 01:16:42.000000000 +0200
@@ -90,6 +90,8 @@
self.add("logfile", "runner.logfile", "l:", "logfile=")
self.add("start_timeout", "runner.start_timeout",
"T:", "start-timeout=", int, default=300)
+ self.add("transcript", "runner.transcript", "t:", "transcript=",
+ default="/dev/null")
self.add("python", "runner.python")
self.add("zdrun", "runner.zdrun")
programname = os.path.basename(sys.argv[0])
diff -Naur -x '*.pyc' /root/site-packages-original/Zope2/Startup/zopectl.py /opt/python/zope2/lib/python2.7/site-packages/Zope2/Startup/zopectl.py
--- lib/python2.7/site-packages/Zope2/Startup/zopectl.py 2015-04-01 01:13:06.821540000 +0200
+++ lib/python2.7/site-packages/Zope2/Startup/zopectl.py 2015-04-01 01:17:23.000000000 +0200
@@ -151,6 +151,8 @@
default=1)
self.add("start_timeout", "runner.start_timeout",
"T:", "start-timeout=", int, default=300)
+ self.add("transcript", "runner.transcript", "t:", "transcript=",
+ default="/dev/null")
self.add("logfile", None, "l:", "logfile=")
self.add("user", "runner.user", "u:", "user=")
self.add("prompt", "runner.prompt", default="zopectl>")