beeware / bugjar

A interactive graphical debugger for Python code.
BSD 3-Clause "New" or "Revised" License
249 stars 31 forks source link

Exception thrown when trying to debug Django application. #6

Closed borfast closed 11 years ago

borfast commented 11 years ago

I just installed bugjar in Ubuntu 13.04 to give it a try at debugging a Django application but I'm getting an exception thrown when I try to execute it with bugjar ./manage.py runserver.

This is the whole error:

(my_project)borfast@computer:~/projects/www/my_project$ bugjar ./manage.py runserver --settings=my_project.settings.local
Listening on 0.0.0.0:3742 for a bugjar client
Traceback (most recent call last):
  File "/home/borfast/.virtualenvs/my_project/bin/bugjar", line 9, in <module>
load_entry_point('bugjar==0.1.0', 'console_scripts', 'bugjar')()
  File "/home/borfast/.virtualenvs/my_project/local/lib/python2.7/site-packages/bugjar/main.py", line 77, in local
jar_run(debugger)
  File "/home/borfast/.virtualenvs/my_project/local/lib/python2.7/site-packages/bugjar/main.py", line 22, in jar_run
view = MainWindow(root, debugger)
  File "/home/borfast/.virtualenvs/my_project/local/lib/python2.7/site-packages/bugjar/view.py", line 79, in __init__
self._setup_main_content()
  File "/home/borfast/.virtualenvs/my_project/local/lib/python2.7/site-packages/bugjar/view.py", line 170, in _setup_main_content
self._setup_code_area()
  File "/home/borfast/.virtualenvs/my_project/local/lib/python2.7/site-packages/bugjar/view.py", line 251, in _setup_code_area
self.code = DebuggerCode(self.code_frame, debugger=self.debugger)
  File "/home/borfast/.virtualenvs/my_project/local/lib/python2.7/site-packages/bugjar/widgets.py", line 11, in __init__
ReadOnlyCode.__init__(self, *args, **kwargs)
  File "/home/borfast/.virtualenvs/my_project/local/lib/python2.7/site-packages/tkreadonly.py", line 107, in __init__
self.lexer = kwargs.pop('lexer')
KeyError: 'lexer'

Any thoughts on what could be the cause and how to fix it?

freakboy3742 commented 11 years ago

This looks like a bug caused cricket 0.1.0's packaging. I fixed bug #1 yesterday, which required pushing an update to tkreadonly, but the bugjar 0.1.0 installer doesn't specify a version requirement for tkreadonly.

The immediate fix:

pip uninstall tkreadonly
pip install tkreadonly==0.5.1

The longer term fix: update tkreadonly to handle the pop('lexer') call better. I'll issue an update to correct that problem.

freakboy3742 commented 11 years ago

I've just uploaded tkreadonly 0.5.3 which should correct this issue. If you run

pip install -U tkreadonly

you should get the fix; or, if you install bugjar from scratch, you'll get the fix too.

borfast commented 11 years ago

That did the trick indeed. Thanks @freakboy3742!