OmegaK2 / PyPoE

Collection of Python Tools for Path of Exile
Other
237 stars 92 forks source link

Specification row size error #87

Closed mniebling closed 5 years ago

mniebling commented 5 years ago

In trying to read Maps.dat I'm getting a row size mismatch error:

D:\Github\PyPoE\PyPoE\poe\file\dat.py:75: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import OrderedDict, Iterable, defaultdict
D:\Github\PyPoE\PyPoE\poe\file\dat.py:992: SpecificationWarning: Did not find proper value for foreign key "Id" with value ""
  warnings.warn(msg, SpecificationWarning)
Traceback (most recent call last):
  File "poe.py", line 20, in <module>
    read['Maps.dat'].build_index('Regular_WorldAreasKey')
  File "D:\Github\PyPoE\PyPoE\poe\file\dat.py", line 975, in __getitem__
    return self.get_file(item).reader
  File "D:\Github\PyPoE\PyPoE\poe\file\dat.py", line 1065, in get_file
    df_other_reader = self[spec_row.key]
  File "D:\Github\PyPoE\PyPoE\poe\file\dat.py", line 975, in __getitem__
    return self.get_file(item).reader
  File "D:\Github\PyPoE\PyPoE\poe\file\dat.py", line 1057, in get_file
    df = self._create_instance(file_name)
  File "D:\Github\PyPoE\PyPoE\poe\file\shared\cache.py", line 214, in _create_instance
    f.read(**self._get_read_args(file_name=file_name, *args, **kwargs))
  File "D:\Github\PyPoE\PyPoE\poe\file\shared\__init__.py", line 192, in read
    return self.get_read_buffer(file_path_or_raw, self._read, *args, **kwargs)
  File "D:\Github\PyPoE\PyPoE\poe\file\shared\__init__.py", line 156, in get_read_buffer
    return function(*args, buffer=f, **kwargs)
  File "D:\Github\PyPoE\PyPoE\poe\file\dat.py", line 916, in _read
    self.reader.read(buffer.read())
  File "D:\Github\PyPoE\PyPoE\poe\file\dat.py", line 809, in read
    'cast_size': self.table_record_length
PyPoE.poe.file.specification.errors.SpecificationError: <ERRORS.RUNTIME_ROWSIZE_MISMATCH: 3002>: "MonsterPacks.dat": Specification row size 73 vs real size 77

I see some other issues and PRs where the specification was updated previously, but this is the first time I'm experimenting with PyPoE and I'm not clear on where the info comes from to know what to update it to. Happy to help further if I can. Thanks!