ppsp-team / HyPyP

The Hyperscanning Python Pipeline
BSD 3-Clause "New" or "Revised" License
75 stars 42 forks source link

viz.get_3d_heads() error #32

Closed phoebsc closed 4 years ago

phoebsc commented 4 years ago

I got this error while running getting_started. It seems that the ../data folder isn't included in the pip installed package, so Basehead.obj is missing.


ReadError Traceback (most recent call last)

in 1 fig, ax = plt.subplots(1, 1) 2 ax.axis("off") ----> 3 vertices, faces = viz.get_3d_heads() 4 camera = Camera("ortho", theta=90, phi=180, scale=1) 5 mesh = Mesh(ax, camera.transform @ glm.yrotate(90), vertices, faces, c:\users\phoebe chen\appdata\local\programs\python\python37\lib\site-packages\hypyp\viz.py in get_3d_heads() 490 # Extract vertices and faces for the first head 491 mesh = meshio.read(os.path.join(os.path.dirname(__file__), --> 492 os.pardir,'data',"Basehead.obj")) 493 zoom = 0.064 494 interval = 0.32 c:\users\phoebe chen\appdata\local\programs\python\python37\lib\site-packages\meshio\_helpers.py in read(filename, file_format) 55 path = pathlib.Path(filename) 56 if not path.exists(): ---> 57 raise ReadError("File {} not found.".format(filename)) 58 59 if not file_format: **ReadError: File c:\users\phoebe chen\appdata\local\programs\python\python37\lib\site-packages\hypyp\..\data\Basehead.obj not found.**
YannBeauxis commented 4 years ago

I modified poetry config to include data/Basehead.obj in pip package. I also modified the getting_started to get .fif data from github url. All in the branch manage-data-folder ready to be published on a new 0.2.0-alpha2 version.

phoebsc commented 4 years ago

Great! Thanks!