Question:
When I am trying to install discord.py in shell showing OSerror no 13 so how I can fix?
Repl link:
code snippet
Question:
When I am trying to install discord.py in shell showing OSerror no 13 so how I can fix?
Repl link:
code snippet
Hi @TWO-PARTYPARTY , welcome back!
Try running poetry add discord.py
in the Shell, instead of pip install
.
Hope this helps!
Could you add the link to your repl?
Also, try adding a pyproject.toml
file if you don’t have one, and enter this:
[tool.poetry]
name = "python-template"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = ">=3.10.0,<3.11"
[tool.pyright]
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md
useLibraryCodeForTypes = true
exclude = [".cache"]
[tool.ruff]
# https://beta.ruff.rs/docs/configuration/
select = ['E', 'W', 'F', 'I', 'B', 'C4', 'ARG', 'SIM']
ignore = ['W291', 'W292', 'W293']
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Then, run the poetry
command again.
Hi @TWO-PARTYPARTY !
Try removing the "discord.py" = "^2.3.2"
line in your pyproject.toml
, then run poetry add discord.py
in the Shell again.
Hi @TWO-PARTYPARTY !
I see. Try deleting the requirements.txt
file, then run poetry add flask requests discord.py
in the Shell.
Then add this below your existing code in your .replit
file:
modules = ["python-3.10:v18-20230807-322e88b"]
hidden = [".pythonlibs"]
[nix]
channel = "stable-23_05"
[unitTest]
language = "python3"
[deployment]
run = ["python3", "main.py"]
deploymentTarget = "cloudrun"
Hope this helps!
There should also be an entrypoint
variable, so that the repl can be run in the workspace.
I’d assume the repl already had one:
Yes, but it only had run and entrypoint lines.
Usually the configuration is completely replaced rather than extended.
I was skimming it so I missed that.
(Also, the venv
folder should be deleted because it would now be redundant.)
Another important thing is that the python version specified in the pyproject.toml
file is "3.9.6"
, and it should be changed to ">=3.9,<4.0"
to prevent poetry errors.
I forgot to tell you that about 9-10 days ago the repl is working properly without any error or something but 4 days ago I tried to use this again but I saw this on screen and after that the repl not working
Did my post or NuclearPasta0’s post above help?
For the upgrade of the environment, was this repl created really long ago?
The OP is using some old template that has venv
configuration and it looks like it wasn’t even originally a python template repl.
Did the upgrade finish successfully?
But after your solution packages started showing and then I tryed to edit . replit again and it worked but then showing no module named `discord’ or when I am trying to INSTALL or delete discord.py showing this
Hey @TWO-PARTYPARTY !
By running curl -s https://firepup650.replit.app/raw/minifier | bash -s
in the Shell (command made by @Firepup650 ), then installing the packages, it worked.
Here’s the repl I made:
https://replit.com/@NateDhaliwal/discord-bot-lua-obfuscator-1
You can fork the repl and use it, but remember to add the Secret for your bot in the repl.
Hope this solves your problem!
Thx code fixed but don’t know what happened to my code bot not replying to my text files -_ btw thx
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.