Closed left-second closed 3 years ago
You don't need to use that html file. Check the contents of private.py in "Other" directory. Fill those in with the required IDs as I mentioned. Run main.py and it should work. Let me know if you have any other problems with this.
Hi, thanks for your response. I have added the token, my user id and bot id but when running main.py I get the following errors:
Traceback (most recent call last):
File "C:\Users\User\Minigamesbot\main.py", line 1, in
That error means that you have not installed the necessary packages to run the bot. Run the following command in the project directory: pip install requirements.txt
Reran requirements.txt and also tried doing them individually: python-chess, pillow, aiohttp, pydealer, discord, numpy, gpiozero, dblpy Requirements already satisfied.
It seems like I forgot to include that library in requirements.txt, my bad. Try this command to install checkers lib: pip install imparaai-checkers
It looks like we're getting closer. The import errors have disappeared thanks to you with the checkers installation. Now when I run the command, it returns these errors:
Loading database... Loading files... Traceback (most recent call last): File "C:\Users\User\Minigamesbot\main.py", line 6, in
bot = MiniGamesBot("!") File "C:\Users\User\Minigamesbot\minigamesbot.py", line 18, in init self.on_startup() File "C:\Users\User\Minigamesbot\minigamesbot.py", line 45, in on_startup on_startup() File "C:\Users\User\Minigamesbot\Other\variables.py", line 176, in on_startup json1_file = open('Data/prefixes.json') FileNotFoundError: [Errno 2] No such file or directory: 'Data/prefixes.json' [Finished in 3.0s with exit code 1]
Create a file that's called prefixes.json at that location. Any other FileNotFoundErrors can be resolved doing that. I also suggest you do some python tutorials as are basic errors. You can analyse the code then too and make adjustments if you want.
I'll give this a last attempt. It seems the errors can't be solved without looking further into the code and making adjustments.
Loading database... Loading files... Traceback (most recent call last): File "C:\Users\User\Minigamesbot\main.py", line 6, in
bot = MiniGamesBot("!") File "C:\Users\User\Minigamesbot\minigamesbot.py", line 18, in init self.on_startup() File "C:\Users\User\Minigamesbot\minigamesbot.py", line 45, in on_startup on_startup() File "C:\Users\User\Minigamesbot\Other\variables.py", line 178, in on_startup Private.prefixes = json.loads(json1_str) File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\json__init__.py", line 348, in loads return _default_decoder.decode(s) File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I've tried numerous times and I can't get it to work so I'll leave it here. You can close the issue if there's nothing to add.
Sorry to bother but I'm stuck on adding it to my own bot. It's a html file and I can't seem to find where I can enter the token and ID's. Could you assist me further? Appreciated.