philippj/SteamworksPy

OverflowError on InviteFriend and SetPlayedWith methods

sabonlise opened this issue · 1 comments

When I try to use methods like InviteFriend or SetPlayedWith, it always causes an error as follows
ctypes.ArgumentError: argument 1: <class 'OverflowError'>: int too long to convert
(fyi I was in game when i tried executing InviteFriend method)
steamid64 gets parsed perfectly fine, however, when I use GetFriendPersonaName here

The code I used to test:

import os
import sys

if sys.version_info >= (3, 8):
    os.add_dll_directory(os.getcwd())

from steamworks import *

steamworks = STEAMWORKS()

steamworks.initialize()
friends = SteamFriends(steamworks)

random_friend = friends.GetFriendByIndex(59)

print(friends.GetFriendPersonaName(random_friend))
print(friends.InviteFriend(random_friend, ""))
print(friends.SetPlayedWith(random_friend))

Output:

Setting breakpad minidump AppID = 480
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  <my steam id> [API loaded no]
Traceback (most recent call last):
  File "G:\steamworks\main.py", line 17, in <module>
    print(friends.SetPlayedWith(random_friend))
  File "G:\steamworks\steamworks\interfaces\friends.py", line 95, in SetPlayedWith
    self.steam.SetPlayedWith(steam_id)
ctypes.ArgumentError: argument 1: <class 'OverflowError'>: int too long to convert
b'kernel'

python version is 3.9.6, also I used precompiled dll for windows

I am currently developing on linux and can not replicate that behavior. What are your system specs and which OS version are you using?