Repl died overnight

I have a python repl and something appears to have happened overnight and now it cannot import any libraries

i get this error

Traceback (most recent call last):
File “main.py”, line 1, in
from keep_alive import keep_alive
File “/home/runner/Wenlaunch-Bot/keep_alive.py”, line 1, in
from flask import Flask,render_template
ImportError: cannot import name ‘Flask’ from ‘flask’ (/home/runner/Wenlaunch-Bot/venv/lib/python3.8/site-packages/flask/init.py)

has been running for months.

seems like pip is broken or corrupted? help

Not sure if related, but https://replit.com/@ShelSilver/UFO-Pilot-Training?v=1 also appears to no longer run after last night.

https://replit.com/@ShelSilver/UFO-Pilot-Training?v=1 also appears to no longer work after last night.

Works for me? The UFO game.

Could you provide a link?

other users also commenting now that it’s not working

This is happening because the file for the init of flask (and I’d assume the rest of the folder, or even many user installed packages), have been corrupted, not in a way to say completely and utterly maliciously changed or turned to gibberish, but to say that while it is still valid python code, I’d say it’s probably empty. This may be caused by the fact that flask is a pre-installed python module, and therefore problems come from testing of python repls or something. Just try uninstalling and reinstalling flask by:

  1. package manager press - on the flask entry then search flask and press + on the first entry
  2. open shell and run pip uninstall flask -y && pip install flask or if the previous command doesn’t work, try pip uninstall flask -y; pip install flask to install and uninstall flask
  3. open shell and enter the command pip install --upgrade flask to upgrade your flask version

pip is also broken i get an error about install wheel

and since i dont believe i can reinstall pip… then we are in trouble right?

its a private repl, discord bot

try poetry remove flask; poetry add flask. Worst come to worst, copy all files manually to another repl (this will solve the file corruption problem, make sure you do not fork, as that will copy the corrupted package files)

it is “possible” to install it with sudo on a linux environment, but I have never been able to get this to work on replit

because, funnily enough, replit does not have sudo installed, and nix evades my understanding to no end (you have to install it via nix – nix just baffles me and I have no idea how to use it).

Finally, installing sudo is not very difficult, but bypassing replit flag securities would be a real headache:

1 Like

yeah… so its fubar right?

i cloned repl and error persisted.

copied files to new repl and it seems fine, but the replit database is empty… anyway to clone that from a repl that wont boot… i can access from shell but only one key at a time

1 Like

to get your previous repl database, do this:

  1. go to shell, enter python
  2. enter os.environ; os.environ["REPLIT_DB_URL"]
  3. copy paste this
  4. in your new repl enter
from replit import db
db.db_url = "URL_YOU_GOT"

EDIT: I see you cannot enter the shell, that complicates things, I apologize as I do not know how to fix this, perhaps try rebuilding your db or just saying you had a server wipe to all users

1 Like

Have anyone else’s repls been dying overnight? If so, please send a screenshot/screen recording onto this thread and I’ll take a look.

Please scan through repl history and multiplayers (if any) to see if they might be the cause of corrupted files. Thanks :pray: