-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Original issue posted in DerekRies/arkpy-examples#1
I'm encountering the following error when attempting to read in .arktribe files.
OverflowError: Python int too large to convert to C long
Some have issues however, the majority (83%) of the .arktribe files I've run worked fine.
I can reproduce this issue with a script as simple as this. I have also attached some examples of .arktribe files that encounter this issue.
from arkpy import ark, utils
def main():
file_path = 'Fails/1115390102.arktribe'
tribe = ark.ArkTribe(file_path)
if __name__ == '__main__':
main()
Full error traceback below:
Traceback (most recent call last): File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\tribetest.py", line 9, in <module> main() File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\tribetest.py", line 6, in main tribe = ark.ArkTribe(file_path) File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\arkpy\ark.py", line 416, in __init__ self._load_from_stream(file_path) File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\arkpy\ark.py", line 433, in _load_from_stream struct = arktypes.load_struct(stream) File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\arkpy\arktypes.py", line 28, in load_struct struct = STRUCTS.get(name, BaseStruct)(stream=stream) File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\arkpy\arktypes.py", line 895, in __init__ self.load_and_set_next_property(stream) File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\arkpy\arktypes.py", line 120, in load_and_set_next_property name, prop_type, value = load_property(stream) File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\arkpy\arktypes.py", line 41, in load_property return (name, prop_type, PROPERTIES[prop_type](stream=stream)) File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\arkpy\arktypes.py", line 219, in __init__ self.value = stream.readNullTerminatedString() File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\arkpy\binary.py", line 63, in readNullTerminatedString s = self.unpack(str(length - 1) + 's', length - 1) File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\arkpy\binary.py", line 194, in unpack return unpack(fmt, self.readBytes(length))[0] File "C:\Users\user\Desktop\codingprojects\arktribelogproject\arkpy-master\arkpy-master\arkpy\binary.py", line 22, in readBytes return self.base_stream.read(length) OverflowError: Python int too large to convert to C long