philippj / SteamworksPy

A working Python API system for Valve's Steamworks.
MIT License
212 stars 39 forks source link

Unable to run basic example, getting Error 127 #97

Closed bigwhoopgames closed 10 months ago

bigwhoopgames commented 11 months ago

When I run the 'basic' example I get the following errors:

This is using the precompiled SteamworksPy64.dll

The directory contains the following:

steamworks (folder from repo all of it) steam_api64.dll SteamworksPy64.dll steam_api64.lib init.py steam_appid.txt

Tried with both python 3.12 and 3.11

Outputs the following: image

C:/Users/Derp/AppData/Local/Programs/Python/Python312/python.exe c:/Users/Derp/Desktop/teststeam/init.py Traceback (most recent call last): File "c:\Users\Derp\Desktop\teststeam__init.py", line 22, in steamworks = STEAMWORKS() ^^^^^^^^^^^^ File "c:\Users\Derp\Desktop\teststeam\steamworks__init.py", line 51, in init__ self._initialize() File "c:\Users\Derp\Desktop\teststeam\steamworks__init__.py", line 91, in _initialize self._cdll = CDLL(library_path) # Throw native exception in case of error ^^^^^^^^^^^^^^^^^^ File "C:\Users\Derp\AppData\Local\Programs\Python\Python312\Lib\ctypes\init.py", line 379, in init__ self._handle = _dlopen(self._name, mode) ^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: [WinError 127] The specified procedure could not be found

bigwhoopgames commented 11 months ago

Update:

I was able to compile using the SDK 1.55 version however the example still does not run correctly.

Below is the output using the newly compiled version:

C:\Users\Derp\Desktop\teststeam>python init.py Traceback (most recent call last): File "C:\Users\Derp\Desktop\teststeam__init.py", line 33, in steamworks.initialize() # This method has to be called in order for the wrapper to become functional! ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Derp\Desktop\teststeam\steamworks\init__.py", line 149, in initialize result = self._cdll.SteamInit() ^^^^^^^^^^^^^^^^^^^^^^ OSError: exception: access violation reading 0x0000000000000000

RhysF98 commented 10 months ago

I've got the same issue with the access violation message, tried using V1.65 and V1.64 of SteamworksPy, no luck so far

RhysF98 commented 10 months ago

Figured out what was causing it for me, might be the same issue you're having. You need to have the corresponding game in your steam library as the ID you have in your steam_appid.txt file. If you don't have that game in the library of the account you are logged in as, it will crash out with the access violation error

bigwhoopgames commented 10 months ago

Figured out what was causing it for me, might be the same issue you're having. You need to have the corresponding game in your steam library as the ID you have in your steam_appid.txt file. If you don't have that game in the library of the account you are logged in as, it will crash out with the access violation error

Thanks so much! This fix the issue. I will close this, however I will leave the other issue open since compiling using the latest 1.58 SDK still does not work.