JonnyPtn / zomboi

A discord bot for project zomboid multiplayer servers
49 stars 32 forks source link

Need Help #69

Closed ALFRED-OP closed 4 months ago

ALFRED-OP commented 1 year ago

Anyone have full source without bugs? @JonnyPtn

ALFRED-OP commented 1 year ago

D:\private\New folder>python zomboi.py [2023-02-25 17:26:53] [INFO ] discord.client: logging in using static token [2023-02-25 17:26:56] [INFO ] discord.gateway: Shard ID None has connected to Gateway (Session ID: 1497e28aaa42eb09c06fa12ebdb1d891). 2023-02-25 17:26:58,518:INFO:zomboi: We have logged in as WelcomeAll#8989 2023-02-25 17:26:58,519:INFO:zomboi: channel connected 2023-02-25 17:26:58,519:INFO:zomboi: Loading user history... 2023-02-25 17:26:58,520:INFO:zomboi: User history loaded 2023-02-25 17:26:58,521:INFO:zomboi: Loading Perk history... 2023-02-25 17:26:58,521:INFO:zomboi: Perk history loaded 2023-02-25 17:26:58,522:ERROR:zomboi: Map path ~/home/pzserver/serverfiles/media/maps not found and/or no suitable default 2023-02-25 17:26:58,524:INFO:zomboi: Checking rcon to see if the player counter is correct 2023-02-25 17:26:59,247:INFO:zomboi: Synced players successfully! [2023-02-25 17:27:10] [ERROR ] discord.ext.commands.bot: Ignoring exception in command location Traceback (most recent call last): File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\core.py", line 190, in wrapped ret = await coro(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\private\New folder\maps.py", line 72, in location tree = ET.parse(self.mapsPath + ("/Muldraugh, KY/worldmap.xml")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\xml\etree\ElementTree.py", line 1218, in parse tree.parse(source, parser) File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\xml\etree\ElementTree.py", line 569, in parse source = open(source, "rb") ^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '~/home/pzserver/serverfiles/media/maps/Muldraugh, KY/worldmap.xml'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\bot.py", line 1347, in invoke await ctx.command.invoke(ctx) File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\core.py", line 986, in invoke await injected(*ctx.args, **ctx.kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\core.py", line 199, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: FileNotFoundError: [Errno 2] No such file or directory: '~/home/pzserver/serverfiles/media/maps/Muldraugh, KY/worldmap.xml' [2023-02-25 17:27:18] [ERROR ] discord.ext.commands.bot: Ignoring exception in command option Traceback (most recent call last): File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\bot.py", line 1347, in invoke await ctx.command.invoke(ctx) File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\core.py", line 978, in invoke await self.prepare(ctx) File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\core.py", line 895, in prepare await self._parse_arguments(ctx) File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\core.py", line 802, in _parse_arguments transformed = await self.transform(ctx, param, attachments) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\dipte\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\core.py", line 654, in transform raise MissingRequiredArgument(param) discord.ext.commands.errors.MissingRequiredArgument: option is a required argument that is missing.

JonnyPtn commented 1 year ago

If you tell me what the bugs are then maybe they can be fixed ;)

Looking at your output this is at least part of the issue:

No such file or directory: '~/home/pzserver/serverfiles/media/maps/Muldraugh, KY/worldmap.xml'

So does that file exist?