Hi there, I have a python project, and when i try it lauch console write that i have a problem with .replit . I read the manual that the asked me but it doesnt helped me. Please help me
my file .replit
# The command that runs the program.
run = ["python", "main.py"]
# The primary language of the repl. There can be others, though!
language = "python"
# The main file, which will be shown by default in the editor.
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.
[nix]
channel = "stable-21_11"
# Per-language configuration: python3
[languages.python]
# Treats all files that end with .py as Python.
pattern = "**/*.py"
# Tells the workspace editor to syntax-highlight these files as
# Python.
syntax = "python"
# The command needed to start the Language Server Protocol. For
# linting and formatting.
[languages.python.languageServer]
start = ["pyls"]
# The command to start the interpreter.
[interpreter]
[interpreter.command]
args = [
"stderred",
"--",
"prybar-python3",
"-q",
"--ps1",
"\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ",
"-i",
]
env = { LD_LIBRARY_PATH = "$PYTHON_LD_LIBRARY_PATH" }
# The environment variables needed to correctly start Python and use the
# package proxy.
[env]
VIRTUAL_ENV = "/home/runner/${REPL_SLUG}/venv"
PATH = "${VIRTUAL_ENV}/bin"
PYTHONPATH="${VIRTUAL_ENV}/lib/python3.8/site-packages"
REPLIT_POETRY_PYPI_REPOSITORY="https://package-proxy.replit.com/pypi/"
MPLBACKEND="TkAgg"
# Enable unit tests. This is only supported for a few languages.
[unitTest]
language = "python"
# Add a debugger!
[debugger]
support = true
# How to start the debugger.
[debugger.interactive]
transport = "localhost:0"
startCommand = ["dap-python", "main.py"]
# How to communicate with the debugger.
[debugger.interactive.integratedAdapter]
dapTcpAddress = "localhost:0"
# How to tell the debugger to start a debugging session.
[debugger.interactive.initializeMessage]
command = "initialize"
type = "request"
[debugger.interactive.initializeMessage.arguments]
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.
[debugger.interactive.launchMessage]
command = "attach"
type = "request"
[debugger.interactive.launchMessage.arguments]
logging = {}
# Configures the packager.
[packager]
# Search packages in PyPI.
language = "python3"
# Never attempt to install unit_tests. If there are packages that are being
# guessed wrongly, add them here.
ignoredPackages = ["unit_tests"]
[packager.features]
enabledForHosting = false
# Enable searching packages from the sidebar.
packageSearch = true
# Enable guessing what packages are needed from the code.
guessImports = true
Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you! Any error messages will be helpful too!
Looking at your Repl, I see your issue. You placed all your files in the Vizione folder, while Replit expects them to be in the root of your Repl. Moving them out of the folder should fix this issue.
Running this in Shell will fix your issue (Though more issues occur after that):
thanks, it help me. But there is one more problem, the console writes that it is a ,package aiogram is not installed (but it installed), I go to the Packges tab, click install aiogram (before click uninstall but it wrote that was error details in console)and it says ,Couldn’t install package. See Console for details, or try again., what i can do? this error appeared not only now, it was there from my first project, ту команду которую вы дали ,poetry add flask pyrogram aiogram requests, так же не могу установить (смотрите ниже)
poetry add flask pyrogram aiogram requests
poetry: command not installed. Multiple versions of this command were found in Nix.
Select one to run (or press Ctrl-C to cancel):
>
python39Packages.poetry.out
poetry.out
python38Packages.poetry.out"
после этого появляеться это
"Adding 1 to replit.nix
success
error: the expression selected by the selection path '1' should be a list but is a set
Failed to install nixpkgs.1.
poetry: command not found
Detected change in environment, reloading shell...
nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/stdenv/adapters.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/build-support/trivial-builders.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/top-level/splice.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/top-level/all-packages.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/top-level/aliases.nix'
evaluating file '/nix/store/nfj1lc3dd97dklla8xp8hqivq4059jyd-nixpkgs-stable-21_11-21.11.tar.gz/nixpkgs-stable-21_11/overlay.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/stdenv/generic/default.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/lib/customisation.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/tools/text/gawk/default.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/servers/x11/xorg/default.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/servers/x11/xorg/overrides.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/stdenv/generic/make-derivation.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/build-support/mkshell/default.nix'
evaluating file '/home/runner/2483u45bhidfs/replit.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/stdenv/generic/check-meta.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/lib/systems/doubles.nix'
copied source '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/stdenv/generic/default-builder.sh' -> '/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh'
error: cannot coerce a set to a string, at /nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/stdenv/generic/make-derivation.nix:205:7
(use '--show-trace' to show detailed location information)
Traceback (most recent call last):
File "main.py", line 5, in <module>
from aiogram.dispatcher import Dispatcher
ImportError: cannot import name 'Dispatcher' from 'aiogram.dispatcher' (/home/runner/2483u45bhidfs/.pythonlibs/lib/python3.10/site-packages/aiogram/dispatcher/__init__.py)
That’s where I got stuck when trying to help fix your Repl, as after fixing that one, and a few after it, it still fails on a different one that I can’t find where it’s supposed to be.