Skip to content

Commit c9a5ec0

Browse files
give useful error when native DLL isnt found
1 parent 15ea1dc commit c9a5ec0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

raylib/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@
1212
#
1313
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
1414

15-
from ._raylib_cffi import ffi, lib as rl
15+
import sys
16+
try:
17+
from ._raylib_cffi import ffi, lib as rl
18+
except ModuleNotFoundError:
19+
print("\n*** ERROR LOADING NATIVE CODE ***\n")
20+
print("See https://github.com/electronstudio/raylib-python-cffi/issues/142\n", file=sys.stderr)
21+
print("Your Python is: "+str(sys.implementation)+"\n", file=sys.stderr)
22+
raise
1623
from raylib._raylib_cffi.lib import *
1724
from raylib.colors import *
1825
from raylib.defines import *
1926
import cffi
20-
import sys
2127
from .version import __version__
2228

2329
print("RAYLIB STATIC "+__version__+" LOADED", file=sys.stderr)

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "5.0.0.4.dev1"
1+
__version__ = "5.0.0.4"

0 commit comments

Comments
 (0)