Skip to content

Real stack traces swallowed within python shells #294

Closed

Description

@ml31415

Just getting started with ponyorm, experimenting around with IPython, I ran into the first minor annoyance. Any issue and stack trace is swallowed within pony:

/usr/local/lib/python2.7/dist-packages/pony/utils/utils.pyc in cut_traceback(func, *args, **kwargs)
     72                 tb = tb.tb_next
     73             if last_pony_tb is None: raise
---> 74             if tb.tb_frame.f_globals.get('__name__').startswith('pony.utils') and tb.tb_frame.f_code.co_name == 'throw':
     75                 reraise(exc_type, exc, last_pony_tb)
     76             reraise(exc_type, exc, full_tb)

AttributeError: 'NoneType' object has no attribute 'startswith'

__name__ is not set in a prompt, mb simply adding '' as default for the get would do already.

Activity

  1. kozlovsky commented on Sep 23, 2017

    @kozlovsky
    Member

    Thanks for reporting! Should work now. If you will encounter another shell issues, please report them too.

  2. added a commit that references this issue on Oct 23, 2017
    3353edb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions