Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bvh file playback getting AttributeError: 'MLineSource' object has no attribute 'vectors' and C assertion. #9

Open
lucasnavisens opened this issue Jul 30, 2018 · 0 comments

Comments

@lucasnavisens
Copy link

Hey,

I am trying to run the InteractiveAnimation with a bvh file input (downloaded for examples), seems there is a type discrepancy in the python layer, the method is expecting the vector field to exist
but the object passed in doesn't contain this field.

Located error from stack trace:

  File "/Library/Python/2.7/site-packages/imusim-0.2-py2.7-macosx-10.13-intel.egg/imusim/visualisation/rendering.py", line 187, in renderUpdate
    s.set(x=x, y=y, z=z)
  File "/Library/Python/2.7/site-packages/mayavi/tools/sources.py", line 106, in set
    self.update()
  File "/Library/Python/2.7/site-packages/mayavi/tools/sources.py", line 74, in update
    (self.scalars is not None or self.vectors is not None):
AttributeError: 'MLineSource' object has no attribute 'vectors'

This is my python code:

# Import symbols from IMUSim
from imusim.all import *


model = loadBVHFile('walk.bvh', CM_TO_M_CONVERSION)# the file is in the current directory and is loaded properly.

print(CM_TO_M_CONVERSION)
renderer = BodyModelRenderer(model)

start = model.startTime
end = model.endTime

animation = InteractiveAnimation(start, end, renderer) #failure point.

Full stack trace including C assertion problems.

/Library/Python/2.7/site-packages/pyface/ui/wx/action/action_item.py:367: wxPyDeprecationWarning: Call to deprecated item. Use :meth:`AddTool` instead.
  self.control_id, label, bmp, wx.NullBitmap, kind, tooltip, longtip, None
/Library/Python/2.7/site-packages/pyface/ui/wx/action/action_item.py:385: wxPyDeprecationWarning: Call to deprecated item __call__. Use :meth:`EvtHandler.Bind` instead.
  wx.EVT_TOOL(parent, self.control_id, self._on_tool)
Traceback (most recent call last):
  File "imusim_biovision.py", line 13, in <module>
    animation = InteractiveAnimation(start, end, renderer)
  File "/Library/Python/2.7/site-packages/imusim-0.2-py2.7-macosx-10.13-intel.egg/imusim/visualisation/rendering.py", line 72, in __init__
    r.renderUpdate(self.time)
  File "/Library/Python/2.7/site-packages/imusim-0.2-py2.7-macosx-10.13-intel.egg/imusim/visualisation/rendering.py", line 187, in renderUpdate
    s.set(x=x, y=y, z=z)
  File "/Library/Python/2.7/site-packages/mayavi/tools/sources.py", line 106, in set
    self.update()
  File "/Library/Python/2.7/site-packages/mayavi/tools/sources.py", line 74, in update
    (self.scalars is not None or self.vectors is not None):
AttributeError: 'MLineSource' object has no attribute 'vectors'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
wxAssertionError: C++ assertion "GetEventHandler() == this" failed at /Users/robind/projects/buildbots/macosx-vm6/dist-osx-py27/Phoenix/ext/wxWidgets/src/common/wincmn.cpp(478) in ~wxWindowBase(): any pushed event handlers must have been removed
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at /Users/robind/projects/buildbots/macosx-vm6/dist-osx-py27/Phoenix/ext/wxWidgets/src/common/wincmn.cpp(478) in ~wxWindowBase(): any pushed event handlers must have been removed

Let me know if you have any ideas on how to fix this.

Thanks.
Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant