debugging elastic-recheck results in AttributeError: 'module' object has no attribute 'Cmd'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Gate |
New
|
Undecided
|
Unassigned |
Bug Description
When trying to run elastic recheck in a debugger (pdb /pycharm) I get the following stack trace:
pydev debugger: process 12116 is connecting
Traceback (most recent call last):
File "/home/
globals = debugger.
File "/home/
launch(file, globals, locals) # execute the script
File "/home/
module = loadSource(a[0])
File "/home/
module = imp.load_
File "/home/
import fixtures
File "/home/
from fixtures.fixture import (
File "/home/
from testtools.compat import (
File "/home/
from testtools.
File "/home/
from ._doctest import (
File "/home/
import doctest
File "/usr/lib/
import unittest, difflib, pdb, tempfile
File "/usr/lib/
class Pdb(bdb.Bdb, cmd.Cmd):
AttributeError: 'module' object has no attribute 'Cmd'
Expected behavior: No AttributeError and debugger successfully loads
setting a breakpoint on pdb.py import cmd shows the reason for the error:
<module 'cmd' from '/home/ stack/elastic- recheck/ elastic_ recheck/ tests/unit/ cmd/__init_ _.py'>
The projects 'cmd' package is getting loaded instead of the python built-in <module 'cmd' from '/usr/lib/ python2. 7/cmd.pyc' >.
Current workaround: delete the offending files: recheck/ tests/unit/ cmd/__init_ _.py recheck/ cmd/__init_ _.py
elastic_
elastic_