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

Unable to read .RData - LibrdataError: Invalid file, or file has unsupported features #61

Closed
SaraAlthubaiti opened this issue Dec 17, 2020 · 1 comment

Comments

@SaraAlthubaiti
Copy link

Hi,

I have started using the library to read files here: https://github.com/HerrMo/multi-omics_benchmark_study/tree/master/data/resample-instances

with the following script from your github:

import pyreadr
result = pyreadr.read_r('BLCA_rin.RData') # also works for Rds
print(result.keys())

But I got this error:

---------------------------------------------------------------------------
LibrdataError                             Traceback (most recent call last)
<ipython-input-2-e10bae565a8a> in <module>
      1 import pyreadr
----> 2 result = pyreadr.read_r('BLCA_rin.RData') # also works for Rds
      3 print(result.keys())

~/anaconda3/envs/saraenv/lib/python3.9/site-packages/pyreadr/pyreadr.py in read_r(path, use_objects, timezone)
     46     if not os.path.isfile(path):
     47         raise PyreadrError("File {0} does not exist!".format(path))
---> 48     parser.parse(path)
     49 
     50     result = OrderedDict()

~/anaconda3/envs/saraenv/lib/python3.9/site-packages/pyreadr/librdata.pyx in pyreadr.librdata.Parser.parse()

~/anaconda3/envs/saraenv/lib/python3.9/site-packages/pyreadr/librdata.pyx in pyreadr.librdata.Parser.parse()

LibrdataError: Invalid file, or file has unsupported features

Any help to solve that?

@ofajardo
Copy link
Owner

The files contain S3 objects that are not readable by librdata. Those S3 objects are based on lists, which are not readable either (#8, WizardMac/librdata#32) , so there is no way to solve this right now.

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