OmegaK2/PyPoE

Error

Closed this issue · 5 comments

This error occurs when you try to export something.

23:57:21 Traceback (most recent call last):
  File "c:\users\ruba\pypoe\PyPoE\cli\core.py", line 145, in run
    code = args.func(args)
  File "c:\users\ruba\pypoe\PyPoE\cli\exporter\wiki\handler.py", line 294, in wrapper
    parser = cls(base_path=temp_dir)
  File "c:\users\ruba\pypoe\PyPoE\cli\exporter\wiki\parsers\item.py", line 1415, in __init__
    super().__init__(*args, **kwargs)
  File "c:\users\ruba\pypoe\PyPoE\cli\exporter\wiki\parsers\skill.py", line 241, in __init__
    super().__init__(*args, **kwargs)
  File "c:\users\ruba\pypoe\PyPoE\cli\exporter\wiki\parser.py", line 744, in __init__
    language=config.get_option('language'),
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 962, in __init__
    super(RelationalReader, self).__init__(*args, **kwargs)
  File "c:\users\ruba\pypoe\PyPoE\poe\file\shared\cache.py", line 128, in __init__
    read_func(file)
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 1066, in get_file
    df_other_reader = self[spec_row.key]
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 1066, in get_file
    df_other_reader = self[spec_row.key]
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 1066, in get_file
    df_other_reader = self[spec_row.key]
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 1058, in get_file
    df = self._create_instance(file_name)
  File "c:\users\ruba\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 "c:\users\ruba\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 "c:\users\ruba\pypoe\PyPoE\poe\file\shared\__init__.py", line 156, in get_read_buffer
    return function(*args, buffer=f, **kwargs)
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 917, in _read
    self.reader.read(buffer.read())
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 810, in read
    'cast_size': self.table_record_length
PyPoE.poe.file.specification.errors.SpecificationError: <ERRORS.RUNTIME_ROWSIZE_MISMATCH: 3002>: "GrantedEffects.dat": Specification row size 93 vs real size 94

I'm facing the same issue here.

C:\Users\pboutin\Documents\GitHub\RePoE>python RePoE.py base_items -f "C:\Program Files (x86)\Steam\steamapps\common\Path of Exile\Content.ggpk"
c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\translations.py:118: 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 Iterable, OrderedDict, defaultdict
Loading GGPK ... Done!
Running module 'base_items'
Traceback (most recent call last):
  File "RePoE.py", line 2, in <module>
    RePoE.main('data/')
  File "C:\Users\pboutin\Documents\GitHub\RePoE\RePoE\__init__.py", line 66, in main
    translation_file_cache=tfc, ot_file_cache=otfc)
  File "C:\Users\pboutin\Documents\GitHub\RePoE\RePoE\base_items.py", line 119, in write_base_items
    _create_default_dict(relational_reader['ComponentAttributeRequirements.dat'])
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 1066, in get_file
    df_other_reader = self[spec_row.key]
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 1066, in get_file
    df_other_reader = self[spec_row.key]
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 1066, in get_file
    df_other_reader = self[spec_row.key]
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 1066, in get_file
    df_other_reader = self[spec_row.key]
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 1058, in get_file
    df = self._create_instance(file_name)
  File "c:\users\pboutin\documents\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 "c:\users\pboutin\documents\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 "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\shared\__init__.py", line 151, in get_read_buffer
    return function(*args, buffer=file_path_or_raw, **kwargs)
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 917, in _read
    self.reader.read(buffer.read())
  File "c:\users\pboutin\documents\github\pypoe\PyPoE\poe\file\dat.py", line 810, in read
    'cast_size': self.table_record_length
PyPoE.poe.file.specification.errors.SpecificationError: <ERRORS.RUNTIME_ROWSIZE_MISMATCH: 3002>: "GrantedEffects.dat": Specification row size 93 vs real size 94
ktb88 commented

I've finally resolved this issue.

This is because of the difference between PyPoE specification and current ggpk file.

To resolve this issue, add two lines in the specification file (PyPoE/poe/file/specification/data/stable.py)

First key is 'GrantedEffects.dat' which cause "spec size is 93 vs real size is 94".

We need to simply add 1 byte (i added bool) in the 'GrantEffects.dat' specification like

__all__ = ['specification', ]

specification = Specification({

<... snip ...>

'GrantedEffects.dat': File(
    fields=OrderedDict((
        ('Id', Field(
            type='ref|string',
            unique=True,
        )),
        ('IsSupport', Field(
            type='bool',
        )),

    	<... snip ...>

        ('Data4', Field(
            type='ref|list|int',
        )),
        ('Key0', Field(
            type='ulong',
        )),
        ('hb_unknown_0', Field( # <-- I added this field
            type='bool',
        )),                
    )),
),

<... snip ...>

and after that you need add one more field in the MonsterVarieties.dat which cause "spec size is 435 vs real size is 436". this one is same as previous one.

__all__ = ['specification', ]

specification = Specification({

<... snip ...>

'MonsterVarieties.dat': File(
    fields=OrderedDict((
        ('Id', Field(
            type='ref|string',
            unique=True,
            file_path=True,
        )),
        ('MonsterTypesKey', Field(
            type='ulong',
            key='MonsterTypes.dat',
        )),

        <... snip ...>

        ('hb_unknown_0', Field( # <-- I added this field
            type='bool',
        )),              
    )),
),        

<... snip ...>

I don't know what the 1 byte is but anyway it works :)

Error trying to export Hideout Doodads.

00:14:49 Traceback (most recent call last):
  File "c:\users\ruba\pypoe\PyPoE\cli\core.py", line 145, in run
    code = args.func(args)
  File "c:\users\ruba\pypoe\PyPoE\cli\exporter\wiki\handler.py", line 300, in wrapper
    result = func(parser, pargs, *args, **kwargs)
  File "c:\users\ruba\pypoe\PyPoE\cli\exporter\wiki\parsers\item.py", line 2261, in by_name
    column_id='Name', arg_list=parsed_args.name
  File "c:\users\ruba\pypoe\PyPoE\cli\exporter\wiki\parsers\item.py", line 2427, in _export
    if not f(self, infobox, base_item_type):
  File "c:\users\ruba\pypoe\PyPoE\cli\exporter\wiki\parsers\item.py", line 73, in func
    data = self.rr[data_file].index['BaseItemTypesKey'][
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 1066, in get_file
    df_other_reader = self[spec_row.key]
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 976, in __getitem__
    return self.get_file(item).reader
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 1058, in get_file
    df = self._create_instance(file_name)
  File "c:\users\ruba\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 "c:\users\ruba\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 "c:\users\ruba\pypoe\PyPoE\poe\file\shared\__init__.py", line 156, in get_read_buffer
    return function(*args, buffer=f, **kwargs)
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 917, in _read
    self.reader.read(buffer.read())
  File "c:\users\ruba\pypoe\PyPoE\poe\file\dat.py", line 810, in read
    'cast_size': self.table_record_length
PyPoE.poe.file.specification.errors.SpecificationError: <ERRORS.RUNTIME_ROWSIZE_MISMATCH: 3002>: "HideoutNPCs.dat": Specification row size 32 vs real size 40
ktb88 commented

@Ruba87, that one is same as prev one

you just put ulong field (8 byte) in hideout data :D

    'HideoutNPCs.dat': File(
        fields=OrderedDict((
            ('Hideout_NPCsKey', Field(
                type='ulong',
                key='NPCs.dat',
            )),
            ('Regular_NPCsKeys', Field(
                type='ref|list|ulong',
                key='NPCs.dat',
            )),
            ('HideoutDoodadsKey', Field(
                type='ulong',
                key='HideoutDoodads.dat',
            )),
            ('NPCMasterKey', Field(
                type='int',
                key='NPCMaster.dat',
            )),
            ('Unknown0', Field(
                type='int',
            )),
            ('hb_unknown_0', Field( # <-- added here
                type='ulong',
            )),            
        )),
    ),

Any chance to update the code for these changes?