ValvePython / steam

☁️ Python package for interacting with Steam
http://steam.readthedocs.io
MIT License
1.06k stars 129 forks source link

AttributeError: 'SteamClient' object has no attribute '_listeners' #320

Closed RumRogerz closed 3 years ago

RumRogerz commented 3 years ago

I started simple enough:

from steam.client import SteamClient
client = SteamClient()

Then this comes rolling on out:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/renato/.local/lib/python3.6/site-packages/steam/client/__init__.py", line 63, in __init__
    CMClient.__init__(self)
  File "/home/renato/.local/lib/python3.6/site-packages/steam/core/cm.py", line 91, in __init__
    self.on(EMsg.ChannelEncryptRequest, self.__handle_encrypt_request),
  File "/home/renato/.local/lib/python3.6/site-packages/eventemitter/emitter.py", line 81, in add_listener
    self.emit('new_listener', event, listener)
  File "/home/renato/.local/lib/python3.6/site-packages/steam/core/cm.py", line 99, in emit
    super(CMClient, self).emit(event, *args)
  File "/home/renato/.local/lib/python3.6/site-packages/eventemitter/emitter.py", line 262, in emit
    listeners = self._listeners[event]
AttributeError: 'SteamClient' object has no attribute '_listeners'

I can get as far as that. SteamClient doesn't seem to take in any attributes. I've tried with py3.6 and 3.9 but no dice.

rossengeorgiev commented 3 years ago

You have a module installed, eventemitter, which name is colliding with one the dependencies, Either uninstall that module, or setup a virtualenv.

RumRogerz commented 3 years ago

Right on the money. That fixed it. Thank you sir.