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

First line in traceback isn't shown in some cases #2

Open
vanutp opened this issue Oct 30, 2021 · 0 comments
Open

First line in traceback isn't shown in some cases #2

vanutp opened this issue Oct 30, 2021 · 0 comments
Labels
bug Something isn't working meval Related to code evaluation

Comments

@vanutp
Copy link
Collaborator

vanutp commented Oct 30, 2021

First line in traceback isn't shown when function is not awaited in message, thus awaited by meval instead. In this case, this line is skipped, because it's not message's code

Example:
Original traceback:

async def delete():
    ctx_orig = await ctx.msg.get_reply_message()
    await ctx_orig.delete()
    await ctx.msg.delete()
delete()

TGPy> Error occurred

Traceback (most recent call last):
  File ".../app/run_code/meval.py", line 177, in <listcomp>
    ret = [await el if inspect.isawaitable(el) else el for el in ret]
  File "tgpy://message/...", line 3, in delete
    await ctx_orig.delete()
AttributeError: 'NoneType' object has no attribute 'delete'

Stripped traceback:

Traceback (most recent call last):
  File "tgpy://message/...", line 3, in delete
    await ctx_orig.delete()
AttributeError: 'NoneType' object has no attribute 'delete'
@vanutp vanutp added meval Related to code evaluation bug Something isn't working labels Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working meval Related to code evaluation
Projects
None yet
Development

No branches or pull requests

1 participant