My code is timing out

  • Last updated on July 7, 2023 at 8:14 PM

My code is timing out

Sometimes there are connection issues. It's easiest to check your status in the upper right-hand of your code editor.

If your connection light is not green, please refresh your browser and wait 3 seconds. This should turn your connection light green. If it doesn't turn green, please check the status page.

If the connection light is green, AND you come across this error message: Your code run has timed out — it might indicate we're having a site-wide problem.

You should first check our status page to see if there's an ongoing incident (a link to the status page also appears at the bottom of the error message). If there is an ongoing incident — you might want to subscribe to receive updates. This way, we'll let you know (via email) once the problem is resolved.


Infinite Loop

Another common cause for this error message is writing code that never ends, like an infinite loop: a sequence of instructions that causes the code editor to run your code endlessly. A common example is writing a for loop that iterates through a list while also appending items to that list. As a result, the looping will continue endlessly because we'll never reach the last item on the list.

If you have written an infinite loop, it will cause your code runner to lock up, and you'll no longer be able to run any code. To fix this:
  1. Make sure you only have one Dataquest tab open.
  2. Click your avatar in the top-right corner of your page and select Dashboard.
  3. Open a different mission and run a simple command, e.g.  print("hello").
  4. Click back to your Dashboard.
  5. Navigate back to the mission, fix the error with your code, and then try running your code again.
If you have written an infinite loop, you must fix your code first — otherwise, you'll experience the same result. The best way to get feedback about your code is in our Community