From c858800513cbbf3d339d6a040db35496a3a3e459 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 6 Aug 2016 13:56:38 +1000 Subject: [PATCH] Fixed "TypeError" thrown by SteamUser.__new__() Removed "steam_id" argument from __new__() method call When a new SteamUser is created, it passes SteamID() as a parameter to its __new__ method via the variable "steam_id", which in turn is passed to super().__new__(), the object class. The passing of said argument throws the following error: File "C:\Users\User\AppData\Local\Programs\Python\Python35\lib\site-packages\steam\client\user.py", line 17, in __new__ return super(SteamUser, cls).__new__(cls, steam_id) TypeError: object() takes no parameters Removing the "steam_id" argument fixes the issue. --- steam/client/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steam/client/user.py b/steam/client/user.py index 4d19fb4..c5f1031 100644 --- a/steam/client/user.py +++ b/steam/client/user.py @@ -14,7 +14,7 @@ class SteamUser(object): relationship = EFriendRelationship.No #: friendship status def __new__(cls, steam_id, *args, **kwargs): - return super(SteamUser, cls).__new__(cls, steam_id) + return super(SteamUser, cls).__new__(cls) # removed "steam_id" arg from __new__() def __init__(self, steam_id, steam): self._pstate_ready = Event()