Error reading edited keyframe.CSV file

BUG REPORT

Type of issue
Error reading edited keyframe.CSV file.

Description
When I edit a *.csv file associated with the keyframes of the ‘conveyor’ example in the DEM simulation, an error appears indicating that there is only one column when two are required.

Error from keyframe_mod.f:608
from: keyframe_mod.f
error 1000: Keyframe data file: .KF/keyframe_0001.csv
Line: 2
Number of detected columns: 1
Number of expected columns: 2

Attempts to fix the issue
i used different CSV editors and tried diferent formats.

Did you?

  • Select the relevant category (Installation / How to / Bug report / Share)?
  • Search the forum for similar issues, Read the documentation (MFiX User Manual — MFiX 24.2.1 documentation)?
  • Inspect the console, error and warning messages?

Attach project files
conveyor_2024-07-26T131653.843294.zip (14.4 MB)

Hi @mariocerda
Welcome to the MFiX forum and thank you for the thorough bug report.

It seems that the (new) keyframe reading code in the MFiX solver does not like Windows-style line endings. Unix and Windows/DOS use different conventions to signal line breaks, this has caused untold numbers of compatibility issues over the years, it’s a very old problem - see e.g. https://stackoverflow.com/questions/419291/historical-reason-behind-different-line-ending-at-different-platforms

We will fix this in the next MFiX release. For now, a workaround is to install the dos2unix program: with the MFiX environment activated:

C:\> mamba activate mfix-24.2.1
(mfix-24.2.1) C:\> mamba install dos2unix

Then, whenever you edit the .csv files, after you save them and before you run MFiX, do

(mfix-24.2.1) C:\> dos2unix filename.csv

Sorry for the trouble, and thanks again for the report. Please let us know if you have further issues.

– Charles

I have the same problem and i have this error when i follow your indications :
Looking for: [‘dos2unix’]
conda-forge/win-64 Using cache
conda-forge/noarch Using cache
Pinned packages:

  • python 3.11.*
    Could not solve for environment specs
    The following package could not be installed
    └─ dos2unix does not exist (perhaps a typo or a missing channel).

(mfix-24.2.1) C:\Users\marqu>dos2unix filename.csv
dos2unix: filename.csv: No such file or directory
dos2unix: Skipping filename.csv, not a regular file.

(mfix-24.2.1) C:\Users\marqu>

How about if you do

mamba install -c pkgs/main/win64 dos2unix

Also note that filename.csv should be replaced with the name of your CSV file

I’ll create a 24.2.2 bugfix release to handle the keyframe file issue, will be available later today.

If you upgrade to (new) version 24.2.2 this issue should be resolved, no need for dos2unix

The new version worked very well, thank you very much, you were very kind. thank you a lot!