Closed alexraskin closed 7 months ago
That's an interesting error, I'm personally on python 3.12.1 (The latest version)
and don't see anything too breaking in the latest python patch that would cause this problem.
Are you on an older version of the bot? What operating system are you on?
It might also be good to note, that the method you sent to that link to in client.py
isn't actually used in the bot anywhere as it's supposed to be for testing
Thanks for your cooperation!
I'm using 3.12 as well, and the TOML parser in the standard library interpreted the data type properly for me
I genuinely have no clue why it might be throwing errors for you 🤔
Can't help but notice that your repo uses env rather than toml
os.envron uses strings only (see the docs) so if you're getting this issue with your repo and not this repo specifically, that might be the reason.
os.environ A mapping object where keys and values are strings that represent the process environment.
os.getenv(key, default=None) Return the value of the environment variable key as a string if it exists, or default if it doesn’t. key is a string. Note that since getenv() uses os.environ, the mapping of getenv() is similarly also captured on import, and the function may not reflect future environment changes.
Do let us know whether this is just an issue with your port of our source code to your own bot, or if it's affecting a clone of our project running on your device!
os.envron uses strings only (see the docs) so if you're getting this issue with your repo and not this repo specifically, that might be the reason.
This was the problem! Thank you both for the quick reply! ❤️
Again nice work on the bot!
Glad to be of help and glad you liked it
In that case, I'll mark this issue as closed!
Hello, I am not sure what version of python you are using (I am using 3.12) but I got an error when passing the
PORT
to the Console clientIt's odd because it's set as an
int
in theenv
file.As a work around, I just cast the
str
to anint
.Maybe I am missing something.
https://github.com/KOOKIIEStudios/PalCON-Discord/blob/1e597b922d40dbd69ab1809f5e5505112753b50e/client.py#L33
Thanks for the awesome work!