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 Tutor button causes an error message. #423

Open
asweigart opened this issue Feb 5, 2023 · 4 comments
Open

Python Tutor button causes an error message. #423

asweigart opened this issue Feb 5, 2023 · 4 comments

Comments

@asweigart
Copy link

When I click on the Just Code button from the home page and get sent to the in-browser editor, I then click on the green Python Tutor button and I am sent to https://pythontutor.com/iframe-embed.html#code=&codeDivHeight=600&codeDivWidth=600&cumulative=false&curInstr=0&heapPrimitives=false&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false and get the alert "ERROR! no code or langauge specified in iframe embed URL string"

(I'm using English on the futurecoder.io site.)

@alexmojaki
Copy link
Owner

Thanks for the report! I didn't know about this.

Fortunately, the Python Tutor button is still working, it's just that your editor was empty. It works when there's some code.

But this is still a bug worth fixing, because every other method of running correctly does nothing when given empty code.

@westurner
Copy link

Which of these are the current source of pythontutor.com? Looks like PRs but no Issues these days

.

  • futurecoder: raise an error ui element when code==""
  • onlinepythontutor: present an error when code=""

@alexmojaki
Copy link
Owner

I've tried finding the source before as well. I think it's private now.

This isn't a bug that needs fixing in pythontutor, they give a clear error message about missing code. futurecoder just needs to check if the code is empty before opening pythontutor.

@westurner
Copy link

I think it's both: onlinepythontutor should handle code="" with a precondition check, and futurecoder should not send GET requests where ?code=""

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

3 participants