paulklemm / rvisidata

Open any dataframe with visidata, a terminal-based spreadsheet application
Other
30 stars 2 forks source link

Doesn't work in R 4.0.3 #9

Closed albert-ying closed 4 months ago

albert-ying commented 3 years ago

Hi, I just found visidata and this amazing package when I was frustrated with excel. Visidata itself works well to me, but I tried the example of this package, it doesn't work somehow.

Steps

  1. Open R with R --vanilla, everything in my .visdatarc are commented out.
  2. rvisidata::vd(iris)

It gives

image
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.0.3  jsonlite_1.7.2  rvisidata_0.0.3
torbjorn-sjoberg-voi commented 3 years ago

I have the exact same issue! :/

torbjorn-sjoberg-voi commented 3 years ago

I did some quick testing and there seems to be something off with the json part of the code!

Removing line 9-13 in main.r made the code for me.

image

paulklemm commented 3 years ago

I can't reproduce. I pushed a potential fix, can you please verify if you still have this error?

torbjorn-sjoberg-voi commented 3 years ago

Sadly, did not work. image

It is very strange howver foxusing on a row displays the values correctly! image

albert-ying commented 3 years ago

Same here, seems like some weird thing happens to the numeric columns. Also when I try to edit the cells, the character column works fine, but for the numeric columns, it gives me an error TypeError: 「NoneType' object does not support item assignment|

Also I'm using macOS, not sure if this is related to the problem of reproducing.

torbjorn-sjoberg-voi commented 3 years ago

macOS here aswell

strazto commented 3 years ago

Hm, looks like the json serializer is wrapping scalars weirdly or something.

@albert-ying rvisidata doesn't support editing the data in any meaningful way, so I advise you against that, but what you're describing is still a bug

strazto commented 3 years ago

@torbjorn-sjoberg-voi hi - can you provide a sessionInfo like @albert-ying ?

strazto commented 3 years ago

I can't reproduce this on R 3.6.* rn

paulklemm commented 4 months ago

Is this issue still relevant? Will otherwise close it.