This repository was archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
This repository was archived by the owner on Feb 15, 2024. It is now read-only.
Couldn't start server #50
Copy link
Copy link
Closed
Description
i need help so it keep showing me this error whenever i use webserver
File "C:\Users\\Desktop\Python\Discord\Test.py", line 3, in <module>
from webserver import keep_alive
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\webserver\__init__.py", line 17, in <module>
run_command(["sudo", "mkdir", "-p", f"/etc/webserver/{folder}"])
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
and i found a python script so i copied it and then i ofcourse configured it and then after that its working pretty fine without wbeserver but it keep saying "Server couldn't open" this is the code:
import discord
import python_aternos
import webserver
from discord.ext import commands
from python_aternos import Client
from webserver import keep_alive
token =''
client = commands.Bot(command_prefix='$', help_command=None)
@client.event
async def on_ready():
print(f'Logged in as {client.user}')
@client.command()
async def start(ctx):
try:
aternos = Client.from_credentials("", "")
except Exception as e:
await ctx.send("Couldnt log in")
await ctx.send(f"Error {e}")
else:
servs = aternos.list_servers()
for serv in servs:
if serv.address == 'HorizonSmpDNK.aternos.me:12584':
myserver = serv
try:
myserver.start()
except:
await ctx.send("Server couldn't open.")
else:
await ctx.send('await ctx.send("SERVER SUCESSFULLY OPENED!\nServer Address: HorizonSmpDNK.aternos.me:12584\nPort: 12584")')
keep_alive()
client.run(token)yes i copied the code but it isnt working pls respond i really need help i've been stuck...
this is my plan so basically on discord if someone typied $start the server will start but instead it will just say "Server couldn't open" i tried $start many times... pls respond :(
Metadata
Metadata
Assignees
Labels
No labels