Git Product home page Git Product logo

pypoe's Introduction

Development is currently discontinued

PyPoE

Collection of Python Tools for Path of Exile.

More detailed docs: http://omegak2.net/poe/PyPoE/

The docs are occasionally updated until I get a build bot up - however docs can also be manually built with Sphinx.

Build Status

Common Problems & Advisory

  • Install Python 3.7 for maximum compatibility:
  • To support bundle decompression check out https://github.com/zao/ooz, compile it and place libooz.dll in the python directory
  • UI will be reworked for bundle support and is not functional at the moment
  • On Windows 10 machines there seems to a be bug in the Python installation that prevents arguments being passed to the command line interface; you can identify this issue if you get a "help" listing if you supplied more then 1 argument. See this on stack overflow for possible solutions

Overview

Parts:

  • Library toolkit for programmers (PyPoE/poe)
  • UI based on Qt for browsing the game files
  • CLI interface for extracting/exporting data (for the wiki, more TBD)

Resources

  • IRC Channel: freenode.net/#PyPoE
  • Discord: No official channel, but I can be contacted in #3rd-party-tool-dev in the /r/PathOfExile Discord

Important Notes

Alpha Stage:

  • Code structure and in particular the API may change at any time
  • Incomplete in many areas (check files and TODOs)
  • Tests still have to be written for a lot of things.
  • Many functions and classes are not yet fully documented

Dev branch:

  • Broken code may be committed occasionally to the dev branch

Quick Setup Guide

These instructions are for the current development version of PyPoE.

  • Install Python 3.7 & git
  • On Windows, make sure Python 3.7 and Python "Scripts" folder are in %PATH%
  • Checkout PyPoE with git
  • Go into the PyPoE folder
  • Minimum install: pip3 install -e .
  • Full install: pip3 install -e .[full]
  • Download and compile https://github.com/zao/ooz with cmake
  • Place the resulting libooz.dll in the python folder

Usage

  • UI: pypoe_ui
  • CLI: pypoe_exporter (follow the instructions)
  • API: check the individual files in PyPoE/poe/ or the docs http://omegak2.net/poe/PyPoE/

Credits - People

  • Grinding Gear Games - they created many of the file formats and Path of Exile obviously, so do not reuse their files anywhere without their permission and support them if you are able to :)
  • Chriskang and the original VisualGGPK2
  • chuanhsing (poedb) for helping with meaning of certain specification values and retrieving monster stats

Credits - Libraries

pypoe's People

Contributors

brather1ng avatar chuanhsing avatar d07riv avatar eps1lon avatar gloorf avatar ifry avatar john-paul-r avatar john-tho avatar maxbachmann avatar nickryder avatar norepro avatar omegak2 avatar ppoelzl avatar ruba87 avatar shirohana avatar temmings avatar zaafar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pypoe's Issues

Error

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

"GeometryAttack.dat": Specification row size 98 vs real size 102

Latest snapshot, latest patch... Never had a luck to run it successfully. Could it at least ignore error and resume?

14:10:20 Reading "/w/energ/Content.ggpk"...

14:11:24 Reading .dat files
34%|████████████████████████████████████████ | 149/443 [00:02<00:04, 68.23it/s]
14:11:26 Traceback (most recent call last):
File "/w/users/tomek/PyPoE/PyPoE/cli/core.py", line 145, in run
code = args.func(args)
File "/w/users/tomek/PyPoE/PyPoE/cli/exporter/dat/parsers/json.py", line 102, in handle
dat_files = self._read_dat_files(args)
File "/w/users/tomek/PyPoE/PyPoE/cli/exporter/dat/handler.py", line 124, in _read_dat_files
df.read(file_path_or_raw=node.record.extract(), use_dat_value=False)
File "/w/users/tomek/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 "/w/users/tomek/PyPoE/PyPoE/poe/file/shared/init.py", line 151, in get_read_buffer
return function(*args, buffer=file_path_or_raw, **kwargs)
File "/w/users/tomek/PyPoE/PyPoE/poe/file/dat.py", line 919, in _read
self.reader.read(buffer.read())
File "/w/users/tomek/PyPoE/PyPoE/poe/file/dat.py", line 812, in read
'cast_size': self.table_record_length
PyPoE.poe.file.specification.errors.SpecificationError: <ERRORS.RUNTIME_ROWSIZE_MISMATCH: 3002>: "GeometryAttack.dat": Specification row size 98 vs real size 102

Errors performing initial install

$ python setup.py develop
Traceback (most recent call last):
  File "setup.py", line 17, in <module>
    with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
  File "/usr/lib64/python3.4/codecs.py", line 896, in open
    file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pajlada/git/PyPoE/DESCRIPTION.rst'

I solved this by simply creating an empty file called DESCRIPTION.rst in the root folder, but pushing it to the git repository would be better.

Write support for GGPKFile files

Currently there is no working write support in the GGPKFile class.

This issue most likely won't be fixed, as I don't see many good reasons to modify the content .ggpk:

  • forbidden by GGG's ToS; in other words it will get you banned
  • it could be used for cheating

Is it correct that the currently used GGPK viewer doesnt show all files?

When writing my own parser I found a lot of files that seemed "orphaned" in that I could not find a proper parent when going down from the original GGPK root record.

image

Is this indeed the case and does the original GGPK viewer incorrectly not show the complete contents of the GGPK, or am I overlooking the location of the files (or perhaps something else)?

image

image

image

image

Translation support

Support for translations, i.e. running the UI/CLI in locales other then English.

For the QT4 API, using the QT translations
For the CLI API, possibly ugettext or so

can't export dat - Specification row size error

Specification error, i've never had luck to run the export succesfully. Maybe some kind of mechanism could be developed, that in case of mismatch in specification, new "unknown" field is created in export?

10:26:09 Reading .dat files
18%|█████████████████████▋ | 75/414 [00:01<00:06, 54.53it/s]
10:26:10 Traceback (most recent call last):
File "/w/users/tomek/PyPoE/PyPoE/cli/core.py", line 145, in run
code = args.func(args)
File "/w/users/tomek/PyPoE/PyPoE/cli/exporter/dat/parsers/json.py", line 102, in handle
dat_files = self._read_dat_files(args)
File "/w/users/tomek/PyPoE/PyPoE/cli/exporter/dat/handler.py", line 124, in _read_dat_files
df.read(file_path_or_raw=node.record.extract(), use_dat_value=False)
File "/w/users/tomek/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 "/w/users/tomek/PyPoE/PyPoE/poe/file/shared/init.py", line 151, in get_read_buffer
return function(*args, buffer=file_path_or_raw, **kwargs)
File "/w/users/tomek/PyPoE/PyPoE/poe/file/dat.py", line 919, in _read
self.reader.read(buffer.read())
File "/w/users/tomek/PyPoE/PyPoE/poe/file/dat.py", line 812, in read
'cast_size': self.table_record_length
PyPoE.poe.file.specification.errors.SpecificationError: <ERRORS.RUNTIME_ROWSIZE_MISMATCH: 3002>: "CustomLeagueMods.dat": Specification row size 46 vs real size 50

No files showing up in UI

I load up my GGPK, it parses it for a minute, says everything is ok, but there are no files in the left pane.

Using it as a library to parse data (i.e. RePoE) works fine.

Partial stat translations with many conditional descriptions are not handled correctly

A wrong translation string is selected for some partial stat translations:

from PyPoE.poe.file import GGPKFile
from PyPoE.poe.file import TranslationFileCache
ggpk = GGPKFile()
ggpk.read('D:/Program Files (x86)/Grinding Gear Games/Path of Exile/Content.ggpk')
ggpk.directory_build()
tf = TranslationFileCache(path_or_ggpk=ggpk)['skill_stat_descriptions.txt']
tr = tf.get_translation(
    tags=['base_number_of_projectiles_in_spiral_nova', 'projectile_spiral_nova_angle'],
    values=[32, -720]
)
print("Expected: Fires Projectiles at all nearby Enemies")
print("Actual:   %s" % tr[0])  # 'Fires 0 Projectile'

This stat combination comes from Vaal Fireball and matches a description with the ids total_number_of_projectiles_to_fire, total_number_of_arrows_to_fire, power_siphon_fire_at_all_targets, base_number_of_projectiles_in_spiral_nova and projectile_spiral_nova_angle.

Two potential causes I noticed while debugging:

  • poe.file.translations.TranslationString.match_range():675: should probably check all values (the actually selected condition is highest rated because ranges for the missing ids are not checked)
  • poe.file.translations.TranslationFile.get_translation():1562: should maybe set all 0xFFFFFFFF values to 0 (0xFFFFFFFF might throw some ranges off, not sure)

This is also incorrect in the wiki: http://pathofexile.gamepedia.com/Vaal_Fireball (Vaal Spark is another offender).

can't run pypoe_ui (windows 10)

Tom@User-PC MINGW64 /e/PyPoE-dev
$ pypoe_ui

Tom@User-PC MINGW64 /e/PyPoE-dev
$ Traceback (most recent call last):
File "C:\Users\Tom\AppData\Local\Programs\Python\Python36-32\Scripts\pypoe_ui-script.pyw", line 11, in
load_entry_point('PyPoE', 'gui_scripts', 'pypoe_ui')()
File "c:\users\tom\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init_.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "c:\users\tom\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init_.py", line 2631, in load_entry_point
return ep.load()
File "c:\users\tom\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init_.py", line 2291, in load
return self.resolve()
File "c:\users\tom\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init_.py", line 2297, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "e:\pypoe-dev\PyPoE\ui_init_.py", line 37, in
from PyPoE.ui.ggpk_viewer import GGPKViewerMainWindow
File "e:\pypoe-dev\PyPoE\ui\ggpk_viewer_init_.py", line 37, in
from PyPoE.ui.ggpk_viewer.core import GGPKViewerMainWindow
File "e:\pypoe-dev\PyPoE\ui\ggpk_viewer\core.py", line 37, in
from PySide2.QtCore import *
ImportError: DLL load failed: ▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒.

pypoe and windows 10

So i recently set up windows 10 and had (and still have) some issues. I dont know anything about python so pls review the suggested fixes.

  • pypoe_ui doesnt do anything
  • pypoe_exporter didnt start because:
    Traceback (most recent call last): File "C:\Development\tools\python34\Scripts\pypoe_exporter-script.py", line 9, in <module> load_entry_point('PyPoE==1.0.0a0', 'console_scripts', 'pypoe_exporter')() File "C:\Development\tools\python34\lib\site-packages\pkg_resources\__init__.py", line 519, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "C:\Development\tools\python34\lib\site-packages\pkg_resources\__init__.py", line 2630, in load_entry_point return ep.load() File "C:\Development\tools\python34\lib\site-packages\pkg_resources\__init__.py", line 2310, in load return self.resolve() File "C:\Development\tools\python34\lib\site-packages\pkg_resources\__init__.py", line 2316, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "c:\development\src\python\pypoe\PyPoE\cli\exporter\core.py", line 37, in <module> from PyPoE.poe.constants import VERSION, DISTRIBUTOR File "c:\development\src\python\pypoe\PyPoE\poe\__init__.py", line 35, in <module> from PyPoE.poe import constants, path, util, file, sim ImportError: cannot import name 'util' <class 'ImportError'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

There is no util directory or file in the poe directory so i removed the import. You prob mean util from another package but after the removal pypoe_exporter did everything i wanted it to.

PEP8 compliance

PEP8 compliance of all the files.
Currently the 80 char per line limit is the primary offender.

Default export of .dat to JSON doesn't include all data?

Hi,

I did export with "pypoe_exporter dat json out.json" - but the json file apparently doesn't include all data, for example I can't find a string "When You Kill An Ignited" in it (part of Abberath's Hooves description). Do I have to set in options some additional .dat files to export to see all the data for uniques? I hope the data is present in files as I see RePoE has this data and as I understand it is a wrapper on PyPoe...

Recent update (6/22/2016)

In data file ItemVisualIdentity.dat, I've noticed that the second column, IDTFile, has remained a string but no longer references IDT files -- it now points to DDS image files (which appear to be holding icons). I'm not sure if the IDT file column has moved elsewhere in the table since I no longer needed it in my own code (I was using it purely to find the DDS files).

Maps.dat cannot be read from when raise_error_on_missing_relation=False is set

Hi! I've been trying to access the .dat files inside of the ggpk without extracting with your map example you've posted here.

You've mentioned that we have to set raise_error_on_missing_relation=False, which results in not being able to read Maps.dat at all for me. Does not matter whether you read from the .dat inside of the .ggpk or extracted ones.

Example:

from PyPoE.poe.file.dat import RelationalReader
from PyPoE.poe.file.ggpk import GGPKFile

path = 'D:/Grinding Gear Games/Path of Exile/Content.ggpk'


def load_ggpk(ggpk_path):
    ggpk = GGPKFile()
    ggpk.read(ggpk_path)
    ggpk.directory_build()
    return ggpk


def create_relational_reader(ggpk):
    opt = {
        'use_dat_value': False,
        'auto_build_index': True,
    }
    return RelationalReader(path_or_ggpk=ggpk, read_options=opt, raise_error_on_missing_relation=False)


def parse(r: RelationalReader):
   #workaround around the raise error problem:
    try:
        maps = r['Maps.dat']
    except:
        print("Exception")
        maps = r['Maps.dat']
    print(r.__dict__)
    maps.build_index('Regular_WorldAreasKey')
    maps.build_index('Unique_WorldAreasKey')

    mapDictList = []

    ctr = 0
    for node in r['AtlasNode.dat']:
        ctr = ctr + 1
        map = maps.index['Regular_WorldAreasKey'].get(node['WorldAreasKey'].rowid)
        unique = False
        if map is None:
            map = maps.index['Unique_WorldAreasKey'].get(node['WorldAreasKey'].rowid)
            unique = True
        if map is None:
            print('Missing: %s' % node['WorldAreasKey']['Id'])
            continue
        # indexing creates a list unless unique is specified for the field in the specification
        map = map[0]


        mapDict = {}
        mapDict['Name'] = node['WorldAreasKey']['Name']
        mapDict['Tier'] = map['Tier']
        mapDict['Unique'] = unique
        mapDict['Coordinates'] = [node['X'], node['Y']]

        print(mapDict)

        mapDictList.append(mapDict)


print("Loading")
ggpk = load_ggpk(path)
print("Finish")
rr = create_relational_reader(ggpk)
parse(rr)

raise error = False out:

Missing: MapWorldsHydra
Missing: MapWorldsMinotaur
Missing: MapWorldsPhoenix
Missing: MapWorldsVaalTemple
Missing: MapWorldsShapersRealm

raise error = True out:

{'Unique': False, 'Name': 'Forge of the Phoenix', 'Tier': 16, 'Coordinates': [549.198974609375, 228.63699340820312]}
{'Unique': False, 'Name': 'Vaal Temple', 'Tier': 16, 'Coordinates': [472.4750061035156, 370.156005859375]}
{'Unique': False, 'Name': "The Shaper's Realm", 'Tier': 17, 'Coordinates': [499.8380126953125, 281.28900146484375]}

Can't cancel extraction dialog

In pypoe_ui, if I choose the option to extract, but then cancel the dialog, it will start extracting to "" anyway. There probably needs to be some check around https://github.com/OmegaK2/PyPoE/blob/dev/PyPoE/ui/ggpk_viewer/toolbar.py#L116 but I'm not familiar enough with PyQt, probably an empty string indicates failure?

after 3.1.2 update Mods.dat is giving errors

looks like there is some new data in Mods.dat (make sense, maybe mod tier info etc)
Don't have any expertise in solving that myself. Sorry if this is already reported multiple times, haven't checked discord or anything.

Error on export: "BaseItemTypes.dat": Specification row size 199 vs real size 203

This is my first attempt to use PyPoe, I've tried to export data with command:

pypoe_exporter dat json test.json

And i got this error:

13:11:21 Reading .dat files
3%|██▌ | 11/354 [00:00<00:06, 52.13it/s]
13:11:21 Traceback (most recent call last):
File "c:\users\tomek\desktop\pypoe\PyPoE\cli\core.py", line 145, in run
code = args.func(args)
File "c:\users\tomek\desktop\pypoe\PyPoE\cli\exporter\dat\parsers\json.py", line 102, in handle
dat_files = self._read_dat_files(args)
File "c:\users\tomek\desktop\pypoe\PyPoE\cli\exporter\dat\handler.py", line 130, in read_dat_files
df.read(file_path_or_raw=node.record.extract(), use_dat_value=False)
File "c:\users\tomek\desktop\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\tomek\desktop\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\tomek\desktop\pypoe\PyPoE\poe\file\dat.py", line 919, in _read
self.reader.read(buffer.read())
File "c:\users\tomek\desktop\pypoe\PyPoE\poe\file\dat.py", line 812, in read
'cast_size': self.table_record_length

"BaseItemTypes.dat": Specification row size 199 vs real size 203

How can I fix this?

UI for dat tables does not show row headers and int fields

The UI for dat file tables does not display row headers (except RowID, which doesn't come from the spec) and does not display cells with primitve types (int, ulong, bool).

Happens with all dat files I checked. Below image shows Ascendancy.dat

ui-missing-headers

'BaseItemTypes.dat' in stable spec throws SpecificationError

from PyPoE.poe.file import GGPKFile
from PyPoE.poe.file import RelationalReader
ggpk = GGPKFile()
ggpk.read('D:/Program Files (x86)/Grinding Gear Games/Path of Exile/Content.ggpk')
ggpk.directory_build()
rr = RelationalReader(path_or_ggpk=ggpk, read_options={'use_dat_value': False, 'auto_build_index': True})
rr['BaseItemTypes.dat']
PyPoE.poe.file.specification.errors.SpecificationError: <ERRORS.RUNTIME_ROWSIZE_MISMATCH: 3002>: "BaseItemTypes.dat": Specification row size 178 vs real size 186

Looks like the

            ('Key0', Field(
                type='ulong',
            )),

at the end of the beta spec is missing from the stable spec. It is working fine when I add that to the stable spec.

PyPoE Exporter dat sql. Error while exporting on 21%.

d:\workspace\poe-data>pypoe_exporter dat sql --url mysql://root:[email protected]/pypoe
14:12:06 SQL init - Establishing DB connection
14:12:06 SQL init - Setting session sql_modes
14:12:06 d:\anaconda\lib\site-packages\sqlalchemy\engine\default.py:450:
Warning: (3135, "'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.")
14:12:07 SQL tables - Creating virtual tables from specification...
21%|################8 | 63/299 [00:00<00:00, 617.66it/s]
14:12:07 Traceback (most recent call last):
File "d:\workspace\pypoe\PyPoE\cli\core.py", line 145, in run
code = args.func(args)
File "d:\workspace\pypoe\PyPoE\cli\exporter\dat\parsers\sql.py", line 268, in handle
section = top_section['fields'][sub_field]
File "d:\anaconda\lib\site-packages\configobj.py", line 554, in getitem
val = dict.getitem(self, key)
KeyError: 'StatValues'

Cannot view after extracting a DDS with Transparency

I was able to extract files and view them if they don't have a transparent background (e.g. AtlasBlank.dds AtlasCompletelyBlank.dds TouchOfGod.dds). However when I extract files with a transparent background, they can't be viewed (e.g. 2DArt_UIImages_InGame_7.dds 2DItems_Divination_Images_1.dds 2DArt_UIImages_InGame_CraftingWindow_1.dds), however I do have a preview in GGPK of those files. Is there a problem with the extraction or am I not using the tools to view them?

Specification row size error

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!

Item png icons

Hi, I am bit confused of how to retrieve the .png images of the items. Can you point me in the right direction to how to extract this information?

ValueError: Did not find data magic number

Windows 10 python 3.7.3

  1. pypoe_ui
  2. file -> open ggpk
  3. select data/Mods.dat
    get this error when trying to view.
    ValueError occurred when trying to open Mods.dat:

Traceback (most recent call last):
File "c:\users\jason\documents\pypoe\PyPoE\ui\ggpk_viewer\core.py", line 217, in view_record
parent=self
File "c:\users\jason\documents\pypoe\PyPoE\ui\shared\file\handler.py", line 324, in get_widget
dat_file.read(file_data, use_dat_value=True)
File "c:\users\jason\documents\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\jason\documents\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\jason\documents\pypoe\PyPoE\poe\file\dat.py", line 917, in _read
self.reader.read(buffer.read())
File "c:\users\jason\documents\pypoe\PyPoE\poe\file\dat.py", line 787, in read
'file': self.file_name,
ValueError: Did not find data magic number in "Mods.dat"

Get something similar when trying to use CLI.

Nothing happens when i try to export .dat file

Hello I'm trying to export .dat file using this command:
D:\repositories\PyPoE> pypoe_exporter dat json D:\repositories\PyPoE\BaseItemTypes.json --files C:\Users\Zaly\Desktop\BaseItemTypes.dat
But nothing happens and the console just outputs this:
usage: pypoe_exporter-script.py dat [-h] {json} ...
positional arguments:
{json} Export type
json Export to JSON

optional arguments:
-h, --help show this help message and exit"
What am I doing wrong and how to export .dat files?

How to export Traditional Chinese

How to export Traditional Chinese json from Words.dat
I saw there are some Traditional Chinese translate in stat_descriptions.txt,same as Words.dat,maybe,i guess.
I try to export it
pypoe_exporter dat json BaseItemTypes_chinese.json --files BaseItemTypes.dat --lang Traditional\sChinese

pypoe_exporter dat json BaseItemTypes_chinese.json --files BaseItemTypes.dat --lang "Traditional Chinese"

pypoe_exporter dat json BaseItemTypes_chinese.json --files BaseItemTypes.dat --lang 'Traditional Chinese'
But error.
Any idea?

3.0.1 spec update

Hey,

so I've been doing some work to figure out the new fields added with 3.0.1 and I was wondering if there already exists a platform to discuss the possible meaning of newly added or still unknown fields?

ImportError: No module named enum

Hello,

When starting up, I'm getting the ImportError: No module named enum error. enum wasn't added to Python until 3.4, so... My bet is that you're starting the program using python and not python3, which in my case is python-2.7. Note that the widely-accepted way of starting python is to call python only if your code is 2.7-compatible. In your case, it should be python3.

.dds Files export header invalid (PoE 3.4)

Hi Dude!

First of all, great work!

Im planing to create my own tool for PoE and for this i'm getting familiar with PyPoE. Im a web developer but i'm struggling with python because i got no experience in it and thats why i'm creating this issue to ask you!

I have problems with the .dds files/pictures.
What i already know and did:

  • They are compressed with brotli, have this 4(if i remember correctly) bytes of metadata which do not belong originally to dds-files
  • I have installed the latest brotli (1.0.7)
  • The images are displayed correctly on your GUI
  • set settings to decompress after export in GUI

After i export your .dds files and want to convert them to png/jpg with imagemagick (convert function) i always get an error message that the header is not correct.

There are to ways to export in your GUI:

  • rightlick on the file in the filestructure of your GUI
  • Export button in the menu/toolbar

My Environment:

  • latest Python (3.7)
  • latest brotli (1.0.7)
  • Win 10
  • Path of Exile Content.ggpk: 3.4
  • missing something?

Can you verify that under these circumstances your export is still working?
Do i need to change something or have i forgot something?

As i told, im a developer and i dug alot into your code. Tried to intercept and save the files manually after decompressing with brotli but in all cases i could not manage to export a valid dds file.

Would very appreciate your feedback!

Kind Regards
Ales

Converting dat => csv => dat

Hello and good time of day.
Can this toolset convert dat files to csv and then again to dat that can be loaded into Content.ggpk ?

ItemClassesKey and craftingbenchoptions

Some keys are set to 0. I cant see a pattern since some keys are still valid while others basically got removed.

Dont know if this is a) a problem with the ggpk viewer b) a conscious decision by the devs to obfuscate more or c) a preview of upcoming changes to craftingbenches (though nothing was mentioned in the patch nodes)

I first noticed this in 2.1.2d. It's still the same in 2.1.2e.

Difference in dat file and ggpk

d:\workspace\PyPoE>pypoe_exporter dat json "out/dump.json"
15:09:26 Reading "c:\program files (x86)\steam\SteamApps\common\Path of Exile\content.ggpk"...
15:09:32 Reading .dat files
67%|#####################################################7 | 201/299 [00:05<00:02, 38.86it/s]
15:09:38 Traceback (most recent call last):
File "d:\workspace\pypoe\PyPoE\cli\core.py", line 145, in run
code = args.func(args)
File "d:\workspace\pypoe\PyPoE\cli\exporter\dat\parsers\json.py", line 81, in handle
dat_files = self._read_dat_files(args)
File "d:\workspace\pypoe\PyPoE\cli\exporter\dat\handler.py", line 119, in read_dat_files
df.read(file_path_or_raw=node.record.extract(), use_dat_value=False)
File "d:\workspace\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:\workspace\pypoe\PyPoE\poe\file\shared_init
.py", line 151, in get_read_buffer
return function(*args, buffer=file_path_or_raw, **kwargs)
File "d:\workspace\pypoe\PyPoE\poe\file\dat.py", line 1010, in _read
self.reader.read(buffer.read())
File "d:\workspace\pypoe\PyPoE\poe\file\dat.py", line 903, in read
'cast_size': self.table_record_length
PyPoE.poe.file.dat.SpecificationError: <ERRORS.RUNTIME_ROWSIZE_MISMATCH: 3002>: "Races.dat": Specification row size 33 vs real size 37

Stat description format '$+d%' is not handled correctly

Translations miss the leading '+' for the format '$+d%':

from PyPoE.poe.file import GGPKFile
from PyPoE.poe.file import TranslationFileCache
ggpk = GGPKFile()
ggpk.read('D:/Program Files (x86)/Grinding Gear Games/Path of Exile/Content.ggpk')
ggpk.directory_build()
tf = TranslationFileCache(path_or_ggpk=ggpk)['skill_stat_descriptions.txt']
tr = tf.get_translation(
    tags=['supported_active_skill_gem_quality_%'],
    values=[20]
)
print("Expected: +20% to Quality of Supported Active Skill Gems")
print("Actual:   %s" % tr[0])  # '20% to Quality of Supported Active Skill Gems'

This is correct in the wiki (see e.g. http://pathofexile.gamepedia.com/Enhance_Support), so maybe I'm doing something wrong or the bug is new.

Proposal: add the generic passive skill tree parser

Would be nice to have a set of functions that are aware how to parse and fuse data from various files together (including images). It can then be used for more specific jobs such as JSON generation, wiki exporting, image processing and so on.

pyside not supported on python 3.5 (windows)

I'm running on Windows 7, with a python 3.5 install, running out of Visual Studio 2015 RC2

I was able to get pip to run the install script.
In case this comes up again, in visual studio, if you select the python environment in the environments viewer, then choose the 'pip' subtab, you can directly enter install commands in the search. It then comes up with a result to execute the install. I had to take the local path '.' and fully qualify it, so I was executing from a link below a search for esentially:
-e C:\SomeFolders\GitHubVisualStudio\PyPoE[full]

This seemed to work well, but it broke with the following log:

----- Installing '-e C:\Users\Colin\Documents\GitHubVisualStudio\PyPoE[full]' -----
Obtaining file:///C:/Users/Colin/Documents/GitHubVisualStudio/PyPoE
Collecting configobj (from PyPoE==1.0.0a0)
  Downloading configobj-5.0.6.tar.gz
Collecting PySide (from PyPoE==1.0.0a0)
  Downloading PySide-1.2.4.tar.gz (9.3MB)
    Complete output from command python setup.py egg_info:
    only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Colin\AppData\Local\Temp\pip-build-d0d108fz\PySide
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
----- Failed to install '-e C:\Users\Colin\Documents\GitHubVisualStudio\PyPoE[full]' -----

It seems pretty clear that it's pulling a version of PySide that only supports python 3.4.

I'm not sure if this is expected behavior, or if there is a work-around, perhaps I missed something during the process. I also tried installing PySide from the pip search and got the same version of PySide with the same error.

As a work-around, I'm installing a Python 3.4 environment.

If this is an issue specifically with my windows-visualstudio setup, I can troubleshoot further, otherwise perhaps PySide is holding the project back at 3.4? If it is a problem I can address, I am happy to do so, but I do not know what the current state is intended to be, so I figured I would post the information I had and check in before bumbling around in your codebase.

Thanks for the excellent codebase to explore.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.