Skip to content

I try to read a rds file, but get the following error: #49

@Erikvvats

Description

@Erikvvats

This is my code:

import pyreadr
result = pyreadr.read_r('data/injuryTimeDataset.rds')

This is the error:
parser.parse(path)
File "pyreadr\librdata.pyx", line 117, in pyreadr.librdata.Parser.parse
File "pyreadr\librdata.pyx", line 139, in pyreadr.librdata.Parser.parse
File "pyreadr\librdata.pyx", line 102, in pyreadr.librdata._handle_value_label
File "pyreadr\librdata.pyx", line 197, in pyreadr.librdata.Parser.__handle_value_label
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 1: invalid start byte

What should I do? I have not looked in the rds file, but it is supposed to be a mixture of strings, ints and floats. Lastly, this works:
pyreadr.object_list

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions