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

Error when no marker defined in bioMod #50

Open
EveCharbie opened this issue Mar 18, 2021 · 2 comments
Open

Error when no marker defined in bioMod #50

EveCharbie opened this issue Mar 18, 2021 · 2 comments

Comments

@EveCharbie
Copy link
Contributor

Traceback (most recent call last):
File "/home/user/Documents/PyCharm/plugins/python-ce/helpers/pydev/pydevd.py", line 1438, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/user/Documents/PyCharm/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/user/Documents/Programmation/Eve/Modeles/ModeleVisu.py", line 50, in
b = bioviz.Viz(model_chemin)
File "/home/user/anaconda3/envs/Trampo_bioptim/lib/python3.8/site-packages/bioviz/init.py", line 361, in init
self.set_q(self.Q)
File "/home/user/anaconda3/envs/Trampo_bioptim/lib/python3.8/site-packages/bioviz/init.py", line 401, in set_q
self.__set_markers_from_q()
File "/home/user/anaconda3/envs/Trampo_bioptim/lib/python3.8/site-packages/bioviz/init.py", line 790, in __set_markers_from_q
self.markers[0:3, :, :] = self.Markers.get_data(Q=self.Q, compute_kin=False)
File "/home/user/anaconda3/envs/Trampo_bioptim/lib/python3.8/site-packages/bioviz/init.py", line 82, in get_data
self.get_data_func(**kwargs)
File "/home/user/anaconda3/envs/Trampo_bioptim/lib/python3.8/site-packages/bioviz/init.py", line 103, in _get_data_from_casadi
self.data[:, :, 0] = np.array(self.markers(Q))
ValueError: could not broadcast input array from shape (0,0) into shape (3,0)

@callmekofi
Copy link

It could probably be that an item in the list is not 3D, or it doesn't match other elements. Check the dimensions of the array shape

@pariterre
Copy link
Member

@EveCharbie
Didi we fix this bug? I feel that we just need to add a check when nbMarkers is zero

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

3 participants