{"id":21857,"library":"rdata","title":"rdata","description":"A Python library to read R datasets (.rda, .rdata) into Python objects. Version 1.0.0, stable release, low cadence.","status":"active","version":"1.0.0","language":"python","source_language":"en","source_url":"https://github.com/vnmabus/rdata","tags":["r","data","interoperability","rda","read"],"install":[{"cmd":"pip install rdata","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Used internally for data frame conversion","package":"pandas","optional":false}],"imports":[{"note":"read_rda is exposed at top-level, not in parser submodule.","wrong":"from rdata.parser import read_rda","symbol":"read_rda","correct":"from rdata import read_rda"}],"quickstart":{"code":"from rdata import read_rda\nimport os\n\n# Replace with your .rda file path\nfile_path = os.environ.get('RDATA_FILE', 'data.rda')\nwith open(file_path, 'rb') as f:\n    data = read_rda(f)\nprint(data)\n","lang":"python","description":"Open an .rda file in binary mode and parse with read_rda. Returns a dict of R objects."},"warnings":[{"fix":"Upgrade Python to 3.11 or later.","message":"Requires Python >=3.11; will fail on older Python versions.","severity":"breaking","affected_versions":"1.0.0"},{"fix":"Open the file with open(path, 'rb') before calling read_rda.","message":"read_rda expects a binary file-like object, not a file path. Passing a string path raises TypeError.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace read_r with read_rda and adjust argument order.","message":"The function 'read_r' from older versions (pre-0.2) is deprecated; use read_rda instead.","severity":"deprecated","affected_versions":"<1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use open('file.rda', 'rb') to create a file object.","cause":"Passing a path string directly to read_rda instead of a file object.","error":"TypeError: expected str, bytes or os.PathLike object, not bytes"},{"fix":"Verify the file is an R data file; re-save from R if needed.","cause":"File is not a valid .rda file or is corrupted.","error":"rdata._parser.RDataParserError: invalid file signature"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}