-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description summary
Hi, this project is really cool!
I was just working on migrating R code written by a member of my team to Python, and there are some RDS files containing models which were generated by R. I'm trying to use rdata to parse the RDS file, but I get the following error:
ValueError: 249 is not a valid RObjectType
Please forgive me I am not aware exactly what the RDS file contains, and I don't think I can disclose it. Thank you so much!
Code to reproduce the bug
No response
Data file(s)
No response
Expected result
Valid python object I can use
Actual result
Got an error
Traceback (if an exception is raised)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/**redacted**/lib/python3.12/site-packages/rdata/parser/_parser.py", line 1087, in parse_file
return parse_data(
^^^^^^^^^^^
File "/**redacted**/lib/python3.12/site-packages/rdata/parser/_parser.py", line 1222, in parse_data
return parse_function(
^^^^^^^^^^^^^^^
File "/**redacted**/lib/python3.12/site-packages/rdata/parser/_parser.py", line 1222, in parse_data
return parse_function(
^^^^^^^^^^^^^^^
File "/**redacted**/lib/python3.12/site-packages/rdata/parser/_parser.py", line 1258, in parse_rdata_binary
r_data = parser.parse_all()
^^^^^^^^^^^^^^^^^^
File "/**redacted**/lib/python3.12/site-packages/rdata/parser/_parser.py", line 610, in parse_all
obj = self.parse_R_object()
^^^^^^^^^^^^^^^^^^^^^
File "/**redacted**/lib/python3.12/site-packages/rdata/parser/_parser.py", line 862, in parse_R_object
value[i] = self.parse_R_object(
^^^^^^^^^^^^^^^^^^^^
File "/**redacted**/lib/python3.12/site-packages/rdata/parser/_parser.py", line 862, in parse_R_object
value[i] = self.parse_R_object(
^^^^^^^^^^^^^^^^^^^^
File "/**redacted**/lib/python3.12/site-packages/rdata/parser/_parser.py", line 775, in parse_R_object
tag = self.parse_R_object(reference_list, bytecode_rep_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/**redacted**/lib/python3.12/site-packages/rdata/parser/_parser.py", line 725, in parse_R_object
info = parse_r_object_info(info_int)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/**redacted**/lib/python3.12/site-packages/rdata/parser/_parser.py", line 1282, in parse_r_object_info
type_exp = RObjectType(bits(info_int, 0, 8))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/enum.py", line 757, in __call__
return cls.__new__(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/enum.py", line 1171, in __new__
raise ve_exc
ValueError: 249 is not a valid RObjectTypeSoftware versions
rdata version: 0.11.2
OS: macOS Sonoma 14.2.1
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working