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

Python: Syntax errors should refer to the cell number #2075

Open
seeM opened this issue Jan 17, 2024 · 0 comments
Open

Python: Syntax errors should refer to the cell number #2075

seeM opened this issue Jan 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working lang: python

Comments

@seeM
Copy link
Contributor

seeM commented Jan 17, 2024

Positron Version:

Positron 2024.01.0 (Universal) build 141

Steps to reproduce the issue:

  1. Run either:

    # %%
    a = [1, 2, 3, 4, 5]
    for i in a
        print(i)

    or

    # %%
    a = [1, 2, 3, 4, 5]
    for i in a:
  2. A SyntaxError will be displayed in the Console, with the file name being a random integer, and the line number referring to the cell e.g:

    SyntaxError: invalid syntax (3794545329.py, line 2)
    

What did you expect to happen?

If you run the cell:

# %%
print()
raise Exception()

You will see an error referring to the cell number and line number within that cell:

Exception: 
Cell In[3], line 2
      1 print()
----> 2 raise Exception()

Syntax errors should similarly include the cell number and line number.

Were there any error messages in the output or Developer Tools console?

None.

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

No branches or pull requests

4 participants