Browser error intermittent: Python with Turtle

Hi.

There are two cases for the Output error (errors also occur for Webview, as they have the same domain):

  1. The error is intermittent or sporadic. It usually happens when a repl is opened, or a repl disconnects (for any reason).
  2. The error always happens → the Output domain *.replit.dev is probably blocked, usually by the network. (Historically, replit could potentially be used for proxies. This is harder in modern replit. Using firewalledreplit.com prevented this issue, but I’m not sure if this is still the case.)

If the error is intermittent, try this:
This error cannot go away unless the program is running when the Output is ‘refreshed’.
Ways to ‘refresh’ the Output (must be while program is running and displaying stuff):

  • Click the Try again button
  • Close the Output tab in the editor, then open it back up from an editor New Tab or Tools.
  • Refresh the browser tab (do not stop the program)

Other solutions and context:
Forking the repl may also work.
firewalledreplit.com used to be the solution when the domain was blocked, but no longer.

Important note (especially for turtle):
For most repls: if the program ends, the graphics or produced image disappears. This would also prevent someone from fixing an intermittent Output error. To fix this, simply prevent the program from exiting at the end:

  • Put input() or turtle.exitonclick() or turtle.mainloop() at the end of the program
  • Use configuration that does not exit at the end of the program (this configuration is present by default in very old repls, or it can easily be set).
3 Likes