bacon
bacon copied to clipboard
Crashes Python on Windows
Trying to create a very basic game, and getting crashing on Windows 7 32-bit:
import bacon
class Game:
def on_tick(self):
bacon.clear(0, 0, 0, 1)
bacon.set_color(128, 128, 128, 1)
bacon.fill_rect(50, 50, 150, 150)
bacon.window.width = 512
bacon.window.height = 512
bacon.run(Game())
$ py34 test_bacon.py
Crashes the python interpreter:
Problem signature:
Problem Event Name: APPCRASH
Application Name: python.exe
Application Version: 0.0.0.0
Application Timestamp: 5325ec4b
Fault Module Name: Bacon.dll
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 5377c264
Exception Code: c0000005
Exception Offset: 000798f3
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Using python 3.4:
$ py34 -m pip show bacon
---
Name: bacon
Version: 0.3.1
Location: c:\python34\lib\site-packages
Requires:
Please note that I did have to make some a couple to bacon code to be able to get this far:
- Line 396 in native.py, removed
levels = -1
parameter from call to__import__
. Python 3 no longer supports a negative value for levels, and 0 is the default:
_pkg_resources = __import__('pkg_resources', globals(), locals(), [])
- Line 159 in core.py, changed
import commands
to relative importfrom . import commands
. Not sure if I need to add bacon to my PYTHONPATH to fix this without changing the code.
Have the same problem. When i install bacon the bacon.dll is missing. I get an Error when i try to import it:
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.`
>>> import bacon
WARNING: No logging configuration for "bacon" set; using default
WARNING: Unable to create log file at bacon.log
ERROR: dll_dir is G:\Python3.6\lib\site-packages\bacon\windows64
Traceback (most recent call last):
File "G:\Python3.6\lib\site-packages\bacon\native.py", line 437, in get_lib
return cdll.LoadLibrary(dll)
File "G:\Python3.6\lib\ctypes\__init__.py", line 426, in LoadLibrary
return self._dlltype(name)
File "G:\Python3.6\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Das angegebene Modul wurde nicht gefunden
Traceback (most recent call last):
File "G:\Python3.6\lib\site-packages\bacon\native.py", line 437, in get_lib
return cdll.LoadLibrary(dll)
File "G:\Python3.6\lib\ctypes\__init__.py", line 426, in LoadLibrary
return self._dlltype(name)
File "G:\Python3.6\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Das angegebene Modul wurde nicht gefunden
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "G:\Python3.6\lib\site-packages\bacon\__init__.py", line 4, in <module>
from bacon.all import *
File "G:\Python3.6\lib\site-packages\bacon\all.py", line 1, in <module>
from bacon.core import *
File "G:\Python3.6\lib\site-packages\bacon\core.py", line 152, in <module>
lib = native.load(function_wrapper = _error_wrapper)
File "G:\Python3.6\lib\site-packages\bacon\native.py", line 493, in load
_lib = _dll_path.get_lib()
File "G:\Python3.6\lib\site-packages\bacon\native.py", line 440, in get_lib
raise ImportError('Failed to load DLL %s' % dll)
ImportError: Failed to load DLL Bacon.dll
I hope it will get fixed, bacon looks promising!