Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OverflowError on InviteFriend and SetPlayedWith methods #77

Open
sabonlise opened this issue Aug 11, 2022 · 1 comment
Open

OverflowError on InviteFriend and SetPlayedWith methods #77

sabonlise opened this issue Aug 11, 2022 · 1 comment

Comments

@sabonlise
Copy link

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

@philippj
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants