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

a funny sketch_runner (imported mode) syntax error message edge case? #176

Closed
villares opened this issue Nov 3, 2022 · 2 comments
Closed

Comments

@villares
Copy link
Collaborator

villares commented Nov 3, 2022

As I accidentally removed the body of a conditional structure at the end of my sketch, the expected syntax error became... another error because of the sketch_runner post-processing :)

I have no idea how we could deal with this!

image

Some minimal code for reproducing:

def setup():
    size(200, 200)
    
def draw():
    pass

def key_pressed():
    if key == ' ':
        # missing `if` body at the end of sketch
@hx2A
Copy link
Collaborator

hx2A commented Nov 3, 2022

Hmmm, interesting. Your indentation error tripped up Python's ability to find the true location of the indentation error. I looked at the responsible code and it should be relatively easy to fix. Thanks for stumbling onto this bug!

@hx2A hx2A closed this as completed in f67ff60 Nov 3, 2022
hx2A added a commit that referenced this issue Nov 3, 2022
@hx2A
Copy link
Collaborator

hx2A commented Nov 3, 2022

Thanks again for spotting this error, @villares !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants