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 in creating animal direction to body part videos #334

Open
Monica9577 opened this issue Feb 21, 2024 · 3 comments
Open

error when in creating animal direction to body part videos #334

Monica9577 opened this issue Feb 21, 2024 · 3 comments

Comments

@Monica9577
Copy link

Describe the bug
when trying to create the video an error appears the next error

SIMBA INVALID FILE TYPE ERROR: C:\Users\monip\Desktop\TRIAL DEFINITIVO\project_folder\logs\body_part_directionality_dataframes\RI male M47-V_LEFT.csv is not a valid CSV file

To Reproduce
Steps to reproduce the behavior:

  1. Load project
  2. Set video parameters
  3. outlier correction
  4. extract features
  5. In ROI windows - analyze distances; analyze directionality between animals, analyze directionality between body parts; Aggregate boolean conditional statics
  6. In ROI windows - Visualize directionality between body parts; choose body parts and run

Expected behavior
A video with lines connecting the 2 selected body parts of the 2 animals

Desktop (please complete the following information):

  • OS: windows 11
  • Python Version 3.6.8
  • Are you using anaconda: yes

Additional context
I already have updated the simba software to the last version (1.86.1)

@sronilsson
Copy link
Collaborator

Hey @Monica9577! Do you have a full traceback screengrab of the error message?

@Monica9577
Copy link
Author

Yes, I'm pasting you the code

(NEW_SIMBA) C:\Users\monip>simba
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\simba\utils\read_write.py", line 131, in read_df
df = df.astype(np.float32)
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\pandas\core\generic.py", line 5882, in astype
dtype=dtype, copy=copy, errors=errors, **kwargs
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\pandas\core\internals\managers.py", line 581, in astype
return self.apply("astype", dtype=dtype, **kwargs)
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\pandas\core\internals\managers.py", line 438, in apply
applied = getattr(b, f)(**kwargs)
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\pandas\core\internals\blocks.py", line 559, in astype
return self._astype(dtype, copy=copy, errors=errors, values=values, **kwargs)
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\pandas\core\internals\blocks.py", line 643, in _astype
values = astype_nansafe(vals1d, dtype, copy=True, **kwargs)
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\pandas\core\dtypes\cast.py", line 729, in astype_nansafe
return arr.astype(dtype, copy=True)
ValueError: could not convert string to float: 'RI female M22-V_RIGHT'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\tkinter_init_.py", line 1705, in call
return self.func(*args)
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\simba\ui\pop_ups\directing_animal_to_bodypart_plot_pop_up.py", line 99, in
command=lambda: self.__create_directionality_plots(multiple_videos=False),
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\simba\ui\pop_ups\directing_animal_to_bodypart_plot_pop_up.py", line 162, in __create_directionality_plots
style_attr=style_attr,
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\simba\plotting\directing_animals_to_bodypart_visualizer.py", line 62, in init
self.data_dict = self.direction_analyzer.read_directionality_dfs()
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\simba\data_processors\directing_animal_to_bodypart.py", line 169, in read_directionality_dfs
results[file_name] = read_df(file_path, self.file_type)
File "C:\Users\monip\anaconda3\envs\NEW_SIMBA\lib\site-packages\simba\utils\read_write.py", line 136, in read_df
msg=f"{file_path} is not a valid CSV file", source=read_df.name
simba.utils.errors.InvalidFileTypeError: SIMBA INVALID FILE TYPE ERROR: C:\Users\monip\Desktop\TRIAL DEFINITIVO\project_folder\logs\body_part_directionality_dataframes\RI female M22-V_RIGHT.csv is not a valid CSV file

@Monica9577
Copy link
Author

hello again

I have updated to the last version and it seems that it doesn't show this error anymore, eventhough in the result video I can't see the expected funnels. But I truly believe it's a problem in the annotations, I'll try to corrected and i'll tell you if the error it's solved

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

2 participants