Ask coding questions

← Back to all posts
My repl stopped running randomly.
NoelB33 (344)

My repl won’t run whenever I run it. It was working yesterday and I never changed it. I don’t know what to do. It just won’t run anything at all. It installs all the packages but then just breaks and doesn’t do anything.

Answered by a5rocks (821) [earned 5 cycles]
View Answer
Comments
hotnewtop
a5rocks (821)

It's because of this:

  applebefore = si.get_live_price("aapl")
  appleafter = si.get_live_price("aapl")
  if(applebefore == appleafter):
    pass

Try moving applebefore = ... to before the while loop, and update it whenever the stocks grow using applebefore = appleafter

NoelB33 (344)

Now I get a gigantic error...

@a5rocks

a5rocks (821)

the ticker is aapl not appl i think @NoelBryan

NoelB33 (344)

That works now, it just has some small errors! It just says “stocks grew” no matter what but i think I can fix that, [email protected]