Fixes and more jupyter examples

parent 49be549b
......@@ -103,22 +103,19 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "878c6d78501a48f0916f2488a270ac8a",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"A Jupyter Widget"
]
},
"metadata": {},
"output_type": "display_data"
"ename": "NameError",
"evalue": "name 'widgets' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-1-d87da51b8000>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m output_gain_slider = widgets.FloatSlider( \n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mvalue\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mva\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_output_gain\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mdescription\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'Output gain:'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mmin\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m0.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[0mmax\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m1.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mNameError\u001b[0m: name 'widgets' is not defined"
]
}
],
"source": [
......
......@@ -318,7 +318,7 @@ static PyObject* call_module( PyObject*, PyObject** ppArgs, Py_ssize_t nArgs, Py
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &pcModuleName, &PyDict_Type, &pArgumentsDict ) )
return NULL;
std::string sModuleName = std::string( pcModuleName );
std::string sModuleName = pcModuleName? std::string( pcModuleName ) : "";
CVAStruct oInArgs = ConvertPythonDictToVAStruct( pArgumentsDict );
CVAStruct oOutArgs = g_pVANetClient->GetCoreInstance()->CallModule( sModuleName, oInArgs );
......@@ -2160,11 +2160,11 @@ static PyObject* get_rendering_module_parameters( PyObject*, PyObject** ppArgs,
{
VAPY_REQUIRE_CONN_TRY;
static const char * const _keywords[] = { "id", "arguments", NULL };
static const char * const _keywords[] = { "renderer_id", "arguments", NULL };
static _PyArg_Parser _parser = { "s|O!:get_rendering_module_parameters", _keywords, 0 };
char* pcID = nullptr;
PyObject* pArgs = NULL;
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &pcID, &pArgs ) )
PyObject* pArgs = nullptr;
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &pcID, &PyDict_Type, &pArgs ) )
return NULL;
std::string sID = pcID ? std::string( pcID ) : "";
......@@ -2184,7 +2184,7 @@ static PyObject* set_rendering_module_parameters( PyObject*, PyObject** ppArgs,
static _PyArg_Parser _parser = { "sO!:set_rendering_module_parameters", _keywords, 0 };
char* pcID = nullptr;
PyObject* pParams = NULL;
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &pcID, pParams ) )
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &pcID, &PyDict_Type, &pParams ) )
return NULL;
std::string sID = pcID ? std::string( pcID ) : "";
......@@ -2297,7 +2297,7 @@ static PyObject* get_reproduction_module_parameters( PyObject*, PyObject** ppArg
static _PyArg_Parser _parser = { "s|O!:get_reproduction_module_parameters", _keywords, 0 };
char* pcID = nullptr;
PyObject* pArgs = NULL;
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &pcID, pArgs ) )
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &pcID, &PyDict_Type, &pArgs ) )
return NULL;
std::string sID = pcID ? std::string( pcID ) : "";
......@@ -2317,7 +2317,7 @@ static PyObject* set_reproduction_module_parameters( PyObject*, PyObject** ppArg
static _PyArg_Parser _parser = { "sO!:set_reproduction_module_parameters", _keywords, 0 };
char* pcID = nullptr;
PyObject* pParams = NULL;
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &pcID, pParams ) )
if( !_PyArg_ParseStack( ppArgs, nArgs, pKeywordNames, &_parser, &pcID, &PyDict_Type, &pParams ) )
return NULL;
std::string sID = pcID ? std::string( pcID ) : "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment