Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clearer tracebacks #1

Open
rlafuente opened this issue Jun 3, 2018 · 1 comment
Open

Add clearer tracebacks #1

rlafuente opened this issue Jun 3, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@rlafuente
Copy link
Contributor

rlafuente commented Jun 3, 2018

Right now we have

Traceback (most recent call last):
  File "shoebot_kernel/kernel.py", line 36, in do_execute
    bot.run(code, break_on_error=True)
  File "/home/rlafuente/repos/python-libs/shoebot/shoebot/grammar/grammar.py", line 240, in run
    self._run_frame(executor, limit=frame_limiter, iteration=iteration)
  File "/home/rlafuente/repos/python-libs/shoebot/shoebot/grammar/grammar.py", line 148, in _run_frame
    executor.run()
  File "/home/rlafuente/repos/python-libs/shoebot/shoebot/grammar/livecode.py", line 115, in run
    self.do_exec(self.known_good, self.ns)
  File "/home/rlafuente/repos/python-libs/shoebot/shoebot/grammar/livecode.py", line 82, in do_exec
    exec source in ns
  File "<string>", line 8, in <module>
NameError: name 'red' is not defined

Only the last 2 lines are relevant, and we're also missing context to make it clear which line is problematic.

@rlafuente rlafuente added the bug Something isn't working label Jun 3, 2018
@stuaxo
Copy link
Contributor

stuaxo commented Feb 17, 2021

friendly-traceback is a library worth investigating, it lets you skip certain specific which is what's needed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants