Ask coding questions

← Back to all posts
Exit status 2? I've tried everything
19jewellj (0)

In my game, I am trying to open and run a seperate file (for another level) when the player reaches a certain point but i keep getting the message 'repl process died unexpectedly: exit status 2' I've looked it up on here but I cannot find anything that works. Please could someone help

Answered by OldWizard209 (1538) [earned 5 cycles]
View Answer
OldWizard209 (1538)

replit is configured to run a "" file. You don't have that file so it is giving an error. So you have to first make a file, and import your main gameplay function from the Levels folder and run it. Also, in your, you have imported lvl2 function, which doesn't exist. You have to import it like this:

from Levels.lvl2 import greet

and simply run the function:

from Levels.lvl2 import greet

Hope this helps.

19jewellj (0)

@OldWizard209 thanks a lot, I also realised that I need the to be outside the levels folder on its pwn.

IMayBeMe (484)

The issue is that you don't have a file named Just put all your code into instead of having separate files. It's just a lot easier. Or if you want multiple files than do what @OldWizard209 said as their answer works great

GatewayDuckYT (60)

Error Exit 2 is meaning 1 of 2 things

  • RAM OR GB of ur repl as ran out maybe upgrade to hacker plan (students are free)
    or 2
  • Ur repl as ran into over 35 errors and have saved memory by killing th code

updote the post

OldWizard209 (1538)

nope that is not the problem for him/her @GatewayDuckYT

19jewellj (0)

@GatewayDuckYT i dont have any errors apart from the exit status 2, ill try upgrade to hacker plan and see if that works though.