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

pos2vel() broken with GazeBase #517

Closed
dkrako opened this issue Sep 9, 2023 · 1 comment
Closed

pos2vel() broken with GazeBase #517

dkrako opened this issue Sep 9, 2023 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@dkrako
Copy link
Contributor

dkrako commented Sep 9, 2023

Current Behavior

There's a type error in a polars computation.
Maybe there's an operation that gets accidentally a column string?
Or the nesting didn't work properly?
Or there's something strange with the default values?

(base) user3@ift-dgx:~/lab/pymovements                                                                                                                                                                          $ cat t.py
import pymovements as pm                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           dataset = pm.Dataset('GazeBase', path='data/GazeBase')                                                                                                                                                           dataset.download()                                                                                                                                                                                               dataset.load()                                                                                                                                                                                                   dataset.pos2vel()

(base) user3@ift-dgx:~/lab/pymovements                                                                                                                                                                          $ pip install --user --upgrade pymovements                                                                                                                                                                       Looking in indexes: https://pypi.org/simple, https://packagecloud.io/github/git-lfs/pypi/simple                                                                                                                  Requirement already satisfied: pymovements in /home/user3/.local/lib/python3.9/site-packages (0.16.1.post0+git.47e29b71.dirty) 

(base) user3@ift-dgx:~/lab/pymovements
$ python t.py
Downloading https://figshare.com/ndownloader/files/27039812 to data/GazeBase/downloads/GazeBase_v2_0.zip
GazeBase_v2_0.zip: 100%|█████████████████████████████████████████████| 6.25G/6.25G [03:20<00:00, 33.4MB/s]
Checking integrity of GazeBase_v2_0.zip
Extracting GazeBase_v2_0.zip to data/GazeBase/raw
100%|███████████████████████████████████████████████████████████████| 12334/12334 [08:12<00:00, 25.02it/s]  
0%|                                                                  | 22/12334 [00:01<12:45, 16.09it/s]
Traceback (most recent call last):
  File "/home/user3/lab/pymovements/t.py", line 7, in <module>
    dataset.pos2vel()
  File "/home/user3/lab/pymovements/src/pymovements/dataset/dataset.py", line 355, in pos2vel
    gaze_df.pos2vel(method=method, **kwargs)
  File "/home/user3/lab/pymovements/src/pymovements/gaze/gaze_dataframe.py", line 373, in pos2vel
    self.transform('pos2vel', method=method, **kwargs)
  File "/home/user3/lab/pymovements/src/pymovements/gaze/gaze_dataframe.py", line 298, in transform
    [
  File "/home/user3/lab/pymovements/src/pymovements/gaze/gaze_dataframe.py", line 299, in <listcomp>
    df.with_columns(transform_method(**kwargs))
  File "/home/user3/.local/lib/python3.9/site-packages/polars/dataframe/frame.py", line 7631, in with_columns
    self.lazy()
  File "/home/user3/.local/lib/python3.9/site-packages/polars/utils/deprecation.py", line 93, in wrapper
    return function(*args, **kwargs)
  File "/home/user3/.local/lib/python3.9/site-packages/polars/lazyframe/frame.py", line 1695, in collect
    return wrap_df(ldf.collect())
exceptions.ComputeError: arithmetic on string and numeric not allowed, try an explicit cast first

Context

  • Project Version / Commit: v0.16.1
  • Operating System: linux
@dkrako
Copy link
Contributor Author

dkrako commented Oct 13, 2023

fixed with #593

@dkrako dkrako closed this as completed Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant