joern@joern-Aspire-V3-571G:~/python/pyrdacor$ sh pyrdacor.sh
Known pipe types:
glxGraphicsPipe
(all display modules loaded.)
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
:rocket(warning): Failed to get number of rows from [b]python data source datasource.QuestsDS.[/b]
terminate called after throwing an instance of 'boost::python::error_already_set'
Aborted (core dumped)
Very interesting: as you see the marked passage, libRocket recognizes my DataSource. But it seems to ignore the defined function GetNumRows(table)
I’ve double checked the correct spelling
int HighScores::GetNumRows(const EMP::Core::String& table)
Uh, what a stupid mistake - surely occured while translating the examples from c++ which I hardly understand. Reinier, is there an elegant approach to view the python errors? My attempt with traceback does “nothing”. There stands, “core dumped”, is it possible to view this?
I changed the code slightly:
def GetNumRows(self, table):
try:
if table == 'list':
return 1
except:
traceback.print_exc()
return 0
def GetRow(self, row, table, row_index, colums):
print('test')
row.append('Das ist ein Test')
:rocket(warning): Failed to get entries for table list row 0 from python data source datasource.QuestsDS.
and the test-printing again isn’t there. Bit annoying don’t to see python errors. Function call now seems correct:
I don’t think this material is appropriate for the Panda3D manual, as this question doesn’t directly have anything to do with Panda3D, but with the libRocket library.