Originally submitted to Google Code by bryan.oakley on 2 Nov 2010
I have a plugin that, when present in my system, prevents RIDE from starting up.
The culprit seems to be the method importclasses inside pluginloader.py. The offending code appears to be this:
return [ cls for _, cls in
inspect.getmembers(module, predicate=inspect.isclass) ]
In spite of the predicate, it appears to be returning things that are not classes. When I put some debug code in I'm seeing this when I print out each item: (notice the last line is printing out a dict rather than a class -- a dict defined in a library imported by the plugin)
... cls= <class 'testrunner.TestRunner'> cls= <class 'TestSuiteTreeCtrl.TestSuiteTreeCtrl'> cls= {'target': 'src/servicetest', 'lib': 'src/servicetest/lib', 'python': 'src/servicetest/python', 'root': 'src/servicetest', 'conf': 'src/servicetest/conf', 'robot': 'src/servicetest/robot', 'robot_report': 'src/servicetest/report/robot'}
Here's the specific error message I get: Traceback (most recent call last): File "/opt/orbitz-st-3.1-B4/bin/ride.py", line 22, in <module> main(sys.argv[1:]) File "/opt/orbitz-st-3.1-B4/lib/python-2.5/site-packages/robotide/init.py", line 48, in main run(*args) File "/opt/orbitz-st-3.1-B4/lib/python-2.5/site-packages/robotide/init.py", line 57, in _run ride = RIDE(inpath) File "/opt/orbitz-st-3.1-B4/lib/python-2.5/site-packages/robotide/application/application.py", line 34, in init wx.App.init(self, redirect=False) File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/core.py", line 7978, in init self.BootstrapApp() File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/core.py", line 7552, in BootstrapApp return _core.PyApp_BootstrapApp(args, *kwargs) File "/opt/orbitz-st-3.1-B4/lib/python-2.5/site-packages/robotide/application/application.py", line 43, in OnInit context.getcoreplugins()) File "/opt/orbitz-st-3.1-B4/lib/python-2.5/site-packages/robotide/application/pluginloader.py", line 30, in init standardclasses + self.findclasses(loaddirs) ] File "/opt/orbitz-st-3.1-B4/lib/python-2.5/site-packages/robotide/application/pluginloader.py", line 42, in _findclasses if issubclass(cls, Plugin) and cls is not Plugin: TypeError: issubclass() arg 1 must be a class