BPCells icon indicating copy to clipboard operation
BPCells copied to clipboard

Windows/Linux incompatibility

Open pavsol opened this issue 8 months ago • 1 comments

Hi, I have written the matrix with write_matrix_dir() using my Windows laptop. Then I transferred the matrix directory to the Linux server and wanted to continue working there. However, while opening with open_matrix_dir, I got an error: Error in eval(exprs, envir): Matrix has unrecognized version packed-double-matrix-v2

I believe this is due to the inability to read Windows-written matrices on the Linux server. I tried to open a matrix that I generated previously on another Linux machine, and this matrix opened correctly. Interestingly, the Linux-generated matrices can be opened on a Windows PC without any issues.

The BPCells version on all used machines is 0.3.0 installed from Github with remotes::install_github("bnprks/BPCells/r").

Best regards, Pavel

pavsol avatar May 02 '25 21:05 pavsol

Hi @pavsol, I'll take a closer look at this to make a fix, but my strong initial suspicion is that this has to do with windows-style line endings ("\r\n") in the version file. This could cause a false positive version mismatch detection like in the error message you provided. The workaround would be to run echo packed-double-matrix-v2 > version from within the matrix directory on Linux, which should change the line ending to just "\n" as linux expects.

I'll try to get a proper fix for this out soon once I've had a chance to confirm the behavior on Windows.

bnprks avatar May 02 '25 22:05 bnprks