WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-12-2012, 07:17 AM
dcnieho dcnieho is offline
Member
 
Join Date: Feb 2011
Posts: 59
Quote:
Originally Posted by farshizzo View Post
The viz::ref_ptr usage was intentional. You need to #include <viz/ref_ptr> which should come with the SDK.

You should have to set NULL as the return object. However, I just noticed that Vizard is eating up the exception if NULL is returned by the plugin. We'll need to fix this for the next release. In the meantime I would just raise the exception from the Python wrapper method.
Sorry to dig up an old thread, but i am just testing this again with the newest Vizard 4 and SDK (both freshly downloaded today).

When try to send an exception from my python plugin as follows
Code:
PyErr_SetString(PyExc_RuntimeError, "errorstring");
data.set( PYTHON_RETURN_OBJECT, NULL);


I always get a TypeError instead of the exception i'm trying to communicate. The stacktrace always ends like this:
Code:
  File "C:\Program Files (x86)\WorldViz\Vizard4\python\viz.py", line 7381, in command
    return _ipcSend(_VIZ_CMDEXTNODE,self.id,command,mesg,x,y,z,w)
TypeError: command must be an int
The next call above that is me calling the C++ code from the extension node, e.g. self.command(1,stimSpec) (my node derives from viz.VizExtensionNode)

I'm not sure what this typeerror is referring to, as my command is correct, it works without error when not trying to return an exception.

Am I doing something wrong?

Best and thanks,
Dee
Reply With Quote
  #2  
Old 07-12-2012, 11:30 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Can you post the full traceback? It looks like you are using passing an invalid parameter to the command method. As the traceback says, the first argument must be an int, and you are most likely passing some other type.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:36 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC