Hi,
Using a rocket function, I got an error, and I think I understand it, but I don’t know how to avoid it.
the code
face="./datafiles/images/faces/" + face + ".png"
el.SetAttribute("src",face)
the error
Boost.Python.ArgumentError: Python argument types in
Element.SetAttribute(Image, str, unicode)
did not match C++ signature:
SetAttribute(class Rocket::Core::Element *, char const *, char const *)
and when I do this, it works:
el.SetAttribute("src","./datafiles/images/faces/face1.png")
In the signature, it wants two const char *, and I give to it, once a const char * (“src”) and the other argument is a variable (face), and not a const char *.
How can I cast my face to a const char * in python?
Thank you