ArgumentError when calling GameboyCore.open()
Closed this issue · 5 comments
Thanks for your support with the gameboycore-python setup 👍I installed the package like in #11 (comment) using Debian, Python 3.6, Boost 1.60.0, GameboyCore-Python 0.4.5
Now I get an error with a minimal example in GameboyCore.open
:
import gameboycore
core = gameboycore.GameboyCore()
core.open("something")
Traceback (most recent call last):
File "example.py", line 10, in <module>
core.open("roms/infinity.gb")
Boost.Python.ArgumentError: Python argument types in
GameboyCore.open(GameboyCore, str)
did not match C++ signature:
open(GameboyCorePython {lvalue}, std::string)
Wasn't able to reproduce on my Debian VM. But I have a thought of what it could be.
If you don't mind. Have a look here.
Try changing boost::noncopyable
to boost::shared_ptr<GameboyCore>
and then re-compile.
I ran into the same problem today.
Ubuntu 18.04, Python 3.6.6, Boost 1.60.0, gameboycore-python 0.4.5
With the suggested fix, I run into a new problem while rebuilding:
../root/gameboycore-python/src/python/gameboycore_module.cpp:53:60: error: template argument 2 is invalid
class_<GameboyCorePython, boost::shared_ptr<GameboyCore>>("GameboyCore")
^~
Ya, the above was just a suggestion as I could not reproduce.
Can you post your python script and error output?
It's actually the same code and error as OP's.
Whatever I try (like your example), I just end up running into the same error once I get to core.open("rom.gb")
Issues were most likely Boost.Python
related. I've recently moved the project over to pybind11
.
You can install from source on linux.
git clone https://github.com/nnarain/gameboycore-python
cd gameboycore-python
pip install -e .