WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-16-2012, 02:25 AM
dcnieho dcnieho is offline
Member
 
Join Date: Feb 2011
Posts: 59
Dear Farshizzo,

A full traceback is below. The thing is, i only get this error when i'm trying to throw an exception from my C++ plugin, otherwise all executes as it should. So that shouldn't be me using wrong syntax at the Python side, I think?

Code:
** Caught exception in main
Traceback (most recent call last):
  File "<string>", line 11, in <module>
  File "C:\dat\Vizard\walk_Dee_stimuli\script_walk.py", line 6, in <module>
    main.main()
  File "main.py", line 32, in main
    expt.startSesson()
  File "experiment.py", line 93, in startSesson
    self.stim.setStimSpec(cond.worldSpec)
  File "DNstimuli.py", line 62, in setStimSpec
    self.command(1,stimSpec)
  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 self in DNstimuli refers to a class that derives from viz.VizExtensionNode. stimSpec there is a string (or however those are called in Pyhton).

Thanks,
Dee
Reply With Quote
  #2  
Old 07-16-2012, 04:04 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
It looks like you are setting the return value incorrectly. Try using the macro for setting return exceptions:
Code:
PYTHON_DATA_EXCEPTION(data,PyExc_RuntimeError, "errorstring");
Reply With Quote
  #3  
Old 07-16-2012, 06:59 PM
dcnieho dcnieho is offline
Member
 
Join Date: Feb 2011
Posts: 59
Thanks Farshizzo, that did the trick.

Best,
Dee
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 07:58 AM.


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