R
Railway•15mo ago
vasuxdev

Hosting error

i am hosting my discord bot written in python using nextcord library and when i deploy it then it shows no module found 'nextcord'
45 Replies
Percy
Percy•15mo ago
Project ID: ddaf72cb-61dd-4983-badb-883624f55b44
vasuxdev
vasuxdevOP•15mo ago
ddaf72cb-61dd-4983-badb-883624f55b44
LaCrak27
LaCrak27•15mo ago
not a python expert, but seems like a dependecy error is the package inside your requirements.txt file?
vasuxdev
vasuxdevOP•15mo ago
there is no requirements.txt file there is only one main.py file
jonbeau
jonbeau•15mo ago
You need a requirements.txt file with your bots dependencies in it
LaCrak27
LaCrak27•15mo ago
you need to add one with all the packages you wanna use so that railway's container can install em
jonbeau
jonbeau•15mo ago
for example for nextcord you put nextcord==2.5.0 or whatever version you use on each line list a different one
vasuxdev
vasuxdevOP•15mo ago
but in my previous bot written in js nothing happens
LaCrak27
LaCrak27•15mo ago
js is different
vasuxdev
vasuxdevOP•15mo ago
and in my this project when i use pip install discord.py in build command then it shows command not found
LaCrak27
LaCrak27•15mo ago
it auto adds the package-lock.json file just do what we told you, you have to do it look at what packages you use, and put em in the file especifying the version
vasuxdev
vasuxdevOP•15mo ago
just discord.py pakage
LaCrak27
LaCrak27•15mo ago
also, may i ask why you moved to python from js? this implies you at least use nexcord
vasuxdev
vasuxdevOP•15mo ago
more easy and useful i now chnged to discord.py coz i think it will work
LaCrak27
LaCrak27•15mo ago
@jonbeau python is not good :(
vasuxdev
vasuxdevOP•15mo ago
and now have i to make requirements.txt file?
LaCrak27
LaCrak27•15mo ago
yah
vasuxdev
vasuxdevOP•15mo ago
in my github repo
LaCrak27
LaCrak27•15mo ago
can you share the repo?
jonbeau
jonbeau•15mo ago
I'm only just really learning js, I couldn't make a bot with it
vasuxdev
vasuxdevOP•15mo ago
it is private
LaCrak27
LaCrak27•15mo ago
fair just make sure you do have the file in the root directory
vasuxdev
vasuxdevOP•15mo ago
what is have to add in that file
LaCrak27
LaCrak27•15mo ago
funnily enough my 1st contact with js was making a bot all the packages that you use and their versions like nexcord one package per line with syntax packagename==versionnumer
vasuxdev
vasuxdevOP•15mo ago
i removed it
jonbeau
jonbeau•15mo ago
vasuxdev
vasuxdevOP•15mo ago
i am using discord.py now
LaCrak27
LaCrak27•15mo ago
then just discord.py in the requirements file
jonbeau
jonbeau•15mo ago
That one I used pycord but it's a good example
vasuxdev
vasuxdevOP•15mo ago
oh
jonbeau
jonbeau•15mo ago
Easy to make
LaCrak27
LaCrak27•15mo ago
i see that for python ppl use more than the official api...
jonbeau
jonbeau•15mo ago
It's not a common thing? These bot libraries are just wrappers for the official discord API afaik
vasuxdev
vasuxdevOP•15mo ago
No description
vasuxdev
vasuxdevOP•15mo ago
still failed
[stage-0 6/8] RUN --mount=type=cache,id=s/325b29b6-f107-4482-ad53-94626006dcc5-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt:
6.168 ERROR: Could not find a version that satisfies the requirement discord.py>=2.5.0 (from versions: 0.1.0, 0.2.0, 0.2.1, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.7.0, 0.8.0, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.16.4, 0.16.5, 0.16.6, 0.16.7, 0.16.8, 0.16.9, 0.16.10, 0.16.11, 0.16.12, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.4.0, 1.4.1, 1.4.2, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.2.0, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2) 6.168 ERROR: No matching distribution found for discord.py>=2.5.0 6.407 WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available. 6.407 You should consider upgrading via the '/opt/venv/bin/python -m pip install --upgrade pip' comma @lacrak27
LaCrak27
LaCrak27•15mo ago
discord.py has no version higher than 2.3.2 it literally tells you use a lower version
vasuxdev
vasuxdevOP•15mo ago
but in my code i print it
No description
vasuxdev
vasuxdevOP•15mo ago
print(discord.__version__)
print(discord.__version__)
@lacrak27
LaCrak27
LaCrak27•15mo ago
try going for 2.3.2 regardless it seems to be latest available change it in the requirements.txt file
vasuxdev
vasuxdevOP•15mo ago
and google latest version is showing 2.0 ok @lacrak27 Damn working AHHHH Thanks alot
LaCrak27
LaCrak27•15mo ago
no worries
vasuxdev
vasuxdevOP•15mo ago
🥰
LaCrak27
LaCrak27•15mo ago
:)
vasuxdev
vasuxdevOP•15mo ago
you can close now
LaCrak27
LaCrak27•15mo ago
i can't close it, im not a mod
Want results from more Discord servers?
Add your server