I noticed that 'starcluster help start' causes a crash (Python exception), but 'starcluster start -help' does not. I believe the problem is that the 'help' subcommand object does not fully configure the other subcommand object ('start', in this case) before asking it to print its help info. Copying a few lines of initialization code from cli.py to help.py seems to fix this. Please see the bottom of this email for a diff / patch file that fixes the bug (at least on my system, so far).
I just started using StarCluster, and I *love* it. Thank you so much for creating this. I was absolutely giddy in describing it to a co-worker this morning, and it's really helping me get my research done quickly and cheaply. The option to use spot instances as workers is especially brilliant. I hope this little patch helps out in some small way.
Below is (1) the crash log, and (2) the patch to fix it.
---------- CRASH DETAILS ----------
COMMAND: starcluster help start
2013-02-28 10:54:44,162 PID: 12056 config.py:551 - DEBUG - Loading config
2013-02-28 10:54:44,162 PID: 12056 config.py:118 - DEBUG - Loading file: /home/grb/.starcluster/config
2013-02-28 10:54:44,164 PID: 12056 cli.py:287 - DEBUG - Traceback (most recent call last):
File "/home/grb/starclust/venv/local/lib/python2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/cli.py", line 255, in main
File "/home/grb/starclust/venv/local/lib/python2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/commands/help.py", line 21, in execute
File "/home/grb/starclust/venv/local/lib/python2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/commands/start.py", line 39, in addopts
File "/home/grb/starclust/venv/local/lib/python2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/commands/base.py", line 77, in cfg
self._cfg = self.goptions_dict.get('CONFIG')
File "/home/grb/starclust/venv/local/lib/python2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/commands/base.py", line 46, in goptions_dict
AttributeError: 'NoneType' object has no attribute '__dict__'
---------- SYSTEM INFO ----------
Python: 2.7.2+ (default, Oct 4 2011, 20:06:09) [GCC 4.6.1]
--- help.py.orig 2013-02-28 11:03:22.863318498 -0500
+++ help.py 2013-02-28 11:04:13.287884893 -0500
_at__at_ -17,6 +17,10 @@
sc = self.subcmds_map[cmdname]
lparser = optparse.OptionParser(sc.__doc__.strip())
+ sc.gopts = self.gopts
+ sc.parser = lparser
+ sc.gparser = self.gparser
+ sc.subcmds_map = self.subcmds_map
if hasattr(sc, 'addopts'):
Ian W. Davis, PhD
Head of Computing / Bioinformatics
Received on Thu Feb 28 2013 - 11:14:09 EST