voltron: Problem with gdbinit

Hey, me again. gdb 7.4.1-debian is giving me this error:

Exception <type 'exceptions.ImportError'> raised while loading Voltron: No module named blessed
/home/admin/.gdbinit:2: Error in sourced command file:
Undefined command: "voltron".  Try "help".

I’m assuming this is from the ‘import blessed’ line in dbgentry.py. Any ideas?

Sorry I’m treating this as a forum since there’s no official forum for voltron. Cheers

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Well I wasn’t sure about opening an issue. The fact that you mentioned again GDB is linked against the system Python made me realize reinstalling it with brew install gdb --with-python rebuilds it and links it against brew’s Python.

So it’s all good now, and people may find that comment in the current issue.

@defau1t Although past one more years, I meet the same problem ''No module named blessed" and found that’s python version problem.

1). The error cause by the python version:

  • Show Ubuntu 14.04 publish the gdb with python3-interface
$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.

warning: ~/.gdbinit.local: No such file or directory
Exception <class 'ImportError'> raised while loading Voltron: No module named 'blessed'
/home/wilson/.gdbinit:3834: Error in sourced command file:
Undefined command: "voltron".  Try "help".
(gdb) python-interactive
>>> import sys
>>> print sys.version
  File "<stdin>", line 1
    print sys.version
            ^
SyntaxError: Missing parentheses in call to 'print'
>>> import blessed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'blessed'
>>> print(sys.version)                                                                                                                  
3.4.3 (default, Oct 14 2015, 20:31:36) 
[GCC 4.8.4]
>>> 
(gdb) quit

2). So we should change the setup steps a little:

  • For gdb use python3, so we should install module by pip3, not pip
cd <your-work-dir>
git clone https://github.com/snare/voltron.git
cd voltron
sudo pip3 install flask          <<< used by next voltron setup
sudo python3 setup.py install
sudo pip3 install blessed        <<< used by voltron/dbgentry.py
  1. If voltron view backtrace have connect error, please refer the comment #97.