deivit24 / python-steam-api

MIT License
25 stars 11 forks source link

No package metadata was found for steam_web_api #37

Closed tobfd closed 1 month ago

tobfd commented 1 month ago

When i start my py-cord bot i get the error:

C:\Users\tobia\PycharmProjects\tobfd_bot\.venv\Lib\site-packages\discord\client.py:219: DeprecationWarning: There is no current event loop
  asyncio.get_event_loop() if loop is None else loop
Traceback (most recent call last):
  File "C:\Users\tobia\AppData\Local\Programs\Python\Python312\Lib\importlib\metadata\__init__.py", line 397, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\tobia\PycharmProjects\tobfd_bot\.venv\Lib\site-packages\discord\cog.py", line 784, in _load_from_module_spec
    spec.loader.exec_module(lib)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\Users\tobia\PycharmProjects\tobfd_bot\cogs\wospiele.py", line 8, in <module>
    from steam_web_api import Steam
  File "C:\Users\tobia\PycharmProjects\tobfd_bot\.venv\Lib\site-packages\steam_web_api\__init__.py", line 5, in <module>
    from ._version import __version__
  File "C:\Users\tobia\PycharmProjects\tobfd_bot\.venv\Lib\site-packages\steam_web_api\_version.py", line 5, in <module>
    __version__ = version(__package__)
                  ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tobia\AppData\Local\Programs\Python\Python312\Lib\importlib\metadata\__init__.py", line 889, in version
    return distribution(distribution_name).version
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tobia\AppData\Local\Programs\Python\Python312\Lib\importlib\metadata\__init__.py", line 862, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tobia\AppData\Local\Programs\Python\Python312\Lib\importlib\metadata\__init__.py", line 399, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for steam_web_api

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

Traceback (most recent call last):
  File "C:\Users\tobia\PycharmProjects\tobfd_bot\main.py", line 66, in <module>
    bot = Bot()
          ^^^^^
  File "C:\Users\tobia\PycharmProjects\tobfd_bot\main.py", line 25, in __init__
    self.load_cogs(subdirectories=True)
  File "C:\Users\tobia\PycharmProjects\tobfd_bot\.venv\Lib\site-packages\ezcord\bot.py", line 332, in load_cogs
    self.load_extension(cog)
  File "C:\Users\tobia\PycharmProjects\tobfd_bot\.venv\Lib\site-packages\discord\cog.py", line 918, in load_extension
    self._load_from_module_spec(spec, name)
  File "C:\Users\tobia\PycharmProjects\tobfd_bot\.venv\Lib\site-packages\discord\cog.py", line 787, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'cogs.wospiele' raised an error: PackageNotFoundError: No package metadata was found for steam_web_api

I have already deleted my .venv folder and it still does not work.

deivit24 commented 1 month ago

@tobfd hey out of curiosity, what version of the package are you using??

tobfd commented 1 month ago

I am using the latest version of the package. @deivit24

deivit24 commented 1 month ago

@tobfd I may have introduced a bug will get a fix up today and will test

deivit24 commented 1 month ago

@tobfd fixed with new hotfix release 2.0.2!