Closed Sheng08 closed 1 year ago
Hello author:
I found that package_name in the main.py of the latest commit version (6ca0203) is a list type, which causes pkg_resources.get_distribution(package_name) to get the following error:
package_name
pkg_resources.get_distribution(package_name)
package_name = package.split('==') installed = pkg_resources.get_distribution(package_name)
2023-05-20 19:38:40 Traceback (most recent call last): 2023-05-20 19:38:40 File "/DiscordBot/main.py", line 29, in <module> 2023-05-20 19:38:40 check_version() 2023-05-20 19:38:40 File "/DiscordBot/main.py", line 20, in check_version 2023-05-20 19:38:40 installed = pkg_resources.get_distribution(package_name) 2023-05-20 19:38:40 File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 480, in get_distribution 2023-05-20 19:38:40 raise TypeError("Expected string, Requirement, or Distribution", dist) 2023-05-20 19:38:40 TypeError: ('Expected string, Requirement, or Distribution', ['discord.py', '2.2.2'])
My current environment uses docker, and use docker compose up -d to build.
docker compose up -d
In the previous commit version, it can run normally, as follows
package_name, package_version = package.split('==')
Thanks!
fixed
Hello author:
I found that
package_name
in the main.py of the latest commit version (6ca0203) is a list type, which causespkg_resources.get_distribution(package_name)
to get the following error:My current environment uses docker, and use
docker compose up -d
to build.In the previous commit version, it can run normally, as follows
Thanks!