I tried to run other files other than main.py and now nothing is working:(

Can anyone help me with my situation ? I was trying to follow other guides on how to run other files other than main.py but now nothing is working on my account , not even the main.py, I tried to change entrypoint and run and deleted my main.py and then I undid the changes because nothing was running and now after undoing the changes and creating a new main.py , nothing runs now. It’s stuck on this screen whenever I hit run
Repl link:

code snippet
1 Like

Here is my config file as well:

# The command that runs the program. If the interpreter field is set, it will have priority and this run command will do nothing
run = "python3 main.py"

# The primary language of the repl. There can be others, though!
language = "python3"
entrypoint = "main.py"
# A list of globs that specify which files and directories should
# be hidden in the workspace.
hidden = ["venv", ".config", "**/__pycache__", "**/.mypy_cache", "**/*.pyc"]

# Specifies which nix channel to use when building the environment.
channel = "stable-21_11"

# The command to start the interpreter.
  args = [
    "\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ",

VIRTUAL_ENV = "/home/runner/${REPL_SLUG}/venv"
PYTHONPATH = "${VIRTUAL_ENV}/lib/python3.10/site-packages"
REPLIT_POETRY_PYPI_REPOSITORY = "https://package-proxy.replit.com/pypi/"
POETRY_CACHE_DIR = "${HOME}/${REPL_SLUG}/.cache/pypoetry"

# Enable unit tests. This is only supported for a few languages.
language = "python3"

# Add a debugger!
support = true

  # How to start the debugger.
  transport = "localhost:0"
  startCommand = ["dap-python", "main.py"]

    # How to communicate with the debugger.
    dapTcpAddress = "localhost:0"

    # How to tell the debugger to start a debugging session.
    command = "initialize"
    type = "request"

      adapterID = "debugpy"
      clientID = "replit"
      clientName = "replit.com"
      columnsStartAt1 = true
      linesStartAt1 = true
      locale = "en-us"
      pathFormat = "path"
      supportsInvalidatedEvent = true
      supportsProgressReporting = true
      supportsRunInTerminalRequest = true
      supportsVariablePaging = true
      supportsVariableType = true

    # How to tell the debugger to start the debuggee application.
    command = "attach"
    type = "request"

      logging = {}

# Configures the packager.
language = "python3"
ignoredPackages = ["unit_tests"]

  enabledForHosting = false
  # Enable searching packages from the sidebar.
  packageSearch = true
  # Enable guessing what packages are needed from the code.
  guessImports = true

# These are the files that need to be preserved when this 
# language template is used as the base language template
# for Python repos imported from GitHub
requiredFiles = [".replit", "replit.nix", ".config", "venv"]


pattern = "**/*.py"

start = "pylsp"

Hello @dav777jehova, welcome to the community!

In the future, please edit your post’s code to be formatted like this:

Your code here

So that it is easier for staff and members of the community to help you with your issue!

Also see this guide on how to share your code:

PS: if you cannot edit your post, please read around a little to increase your trust level and let you access editing your posts.

cc: @MattDESTROYER @UMARismyname

Could you try reloading the page?


I did try reloading the page several times but it didn’t work. Also I think it gave me an error once main.py doesn’t exist?

The language is python and no code is working , https://replit.com/@dav777jehova/day-1-printing-start#.replit . Here is the link I think? I’m posting the link to other things as well , maybe that will help.


I forked and ran your repl and got this in the console No such file: main.pyit seems the file you are trying to to run is just named main and not main.py

Simply rename it to main.py and it should work.

1 Like

Thank you for doing that but in my folder its named main.py , I already tried deleting it and then renaming it but I’ll try again , maybe I’m doing something wrong.

Sorry I see now, the file you are trying to run IS named main.py it’s just not running because it’s within the venv folder.

To fix this just change the entry point to venv/main.py

can you try this ?


Ow , sure! and no worries:) thanks for all the help

1 Like

Is this what you wanted me to do?

Yes, it looks like it’s stuck, this happened for me as well. You can type kill 1 in the shell to stop it, and then run it again and it should work. At least it did for me


OH MY GOD ITS WORKINGGG , I’m never touching this config file again because I’m afraid I’ll mess it up HAHA

Just changing the entrypoint did it for me , thanks for the extra tip too:)

1 Like

You’re welcome. I think it might have been more so just where you had your files saved (in the venv folder) and having multiple files named main rather than the config file itself which was adding to the confusion.

Ohh, I think I’m getting it a bit now , like how to run files other than main.py and like how to set the location of it like you did here but I’m a bit scared rn so I’ll do it when I can :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.