Hi. Thanks for your reply.
Unfortunately I forgot to mention that cube-info is supposed to be a dictionary
and type(gnubg.cubeinfo()) also returns class ‘dict’.
So, if I try to convert it using “bytes” function (as you mentioned), i will
get an error from bytes function like this:
TypeError: encoding without a string argument
I can convert cube-info dict to bytes using
json.dumps(gnubg.cubeinfo()).encode(‘utf-8’), but calling gnubg methods with
this variable as input will throw an error indicating that cube-info should be
a dictionary (Exception: error in SetCubeInfo).
I should mention that gnubg object is defined in gnubgmodule.c file. So all
these methods and that exception are defined using C in that file.
As far as I can tell, cube-info related methods that are defined in
“gnubgmodule.c” file take a dictionary as input argument, check them and then
call some other functions underneath and finally pass them to Python
interpreter. I think somewhere in those function calls, they should make this
str to byte conversion.
If that’s the case, it would be probably beyond my coding abilities to solve
it. But I’m afraid that maybe that’s not the case and I’m just missing on
something simple. If anybody can try to reproduce this error, that would help a
lot.
Any help is greatly appreciated.
Thanks