ValvePython / vdf

📜 Package for working with Valve's text and binary KeyValue format
https://pypi.org/project/vdf/
MIT License
165 stars 30 forks source link

parse error in 3rd party module #23

Closed Danyelalejandro closed 4 years ago

Danyelalejandro commented 4 years ago

appmanifest_.zip plugin-steam-ca27391f-2675-49b1-92c0-896d43afa4f8.log.zip

rossengeorgiev commented 4 years ago

What is the issue here?

Danyelalejandro commented 4 years ago

Sorry, I was asked to create this issue here, because my issue is very strange. https://github.com/FriendsOfGalaxy/galaxy-integration-steam/issues/7#issuecomment-554631286 I have a huge Steam library with many achievements and I have the next issues:

parse error in 3rd party module. You should create an issue here: https://github.com/ValvePython/vdf/issues pasting folowing part of your log and uploading the acf file

2019-11-13 18:23:25,730 - root - ERROR - Failed to parse e:/steam\steamapps\appmanifest_322330.acf
Traceback (most recent call last):
  File "C:\Users\usuario\AppData\Local\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\vdf\__init__.py", line 121, in parse
    line += next(fp)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\usuario\AppData\Local\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\client.py", line 211, in get_app_id
    config = load_vdf(app_manifest_path)
  File "C:\Users\usuario\AppData\Local\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\client.py", line 21, in load_vdf
    return vdf.load(open(path, encoding="utf-8", errors="replace"), mapper=CaseInsensitiveDict)
  File "C:\Users\usuario\AppData\Local\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\vdf\__init__.py", line 186, in load
    return parse(fp, **kwargs)
  File "C:\Users\usuario\AppData\Local\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\vdf\__init__.py", line 124, in parse
    raise SyntaxError("vdf.parse: unexpected EOF (open key quote?)")
  File "<string>", line None
SyntaxError: vdf.parse: unexpected EOF (open key quote?)
2019-11-13 18:23:26,733 - root - ERROR - Failed to parse e:/steam\steamapps\appmanifest_416680.acf
Traceback (most recent call last):
  File "C:\Users\usuario\AppData\Local\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\client.py", line 212, in get_app_id
    return config["AppState"]["appid"]
  File "C:\Users\usuario\AppData\Local\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\client.py", line 17, in __getitem__
    return super().__getitem__(key.lower())
KeyError: 'appstate'

this apparently is on our side. Could you send us this file? e:/steam\steamapps\appmanifest_416680.acf or e:/steam\steamapps\appmanifest_247080.acf ?

Those error appears every second. Looks like regresion with #10 despite #11 . That is not good. I'll check one more time.

there is nothing in log file that shows your plugin total crash. I will appreciate i you send log file just after the crash. This way proper information won't be misssed.

I added again all missing covers and it has not been erased again

That's nice that Galaxy fixed it.

Not all games are shown. By example: My Sherlock Holmes collection does not appear complete in GOGalaxy 2.0 but it does on Steam launcher.

This is Galaxy gamesdb problem. I see 3 games that are send from plugin to Galaxy that contains "Sherlock" in title. How many do you have in Steam? Note, that DLCs are not handled by plugin/Galaxy yet.

If you Galaxy is missing a game and its title appears in plugin log (under "owned_games"), then this game is probably spammed by their filters, and should be fixed within a few weeks if you send a bug report via the client cogwheel menu.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

rossengeorgiev commented 4 years ago

I see. There are two errors I see.

  1. Failed to parse e:/steam\steamapps\appmanifest_322330.acf looking at the file you've sent, its empty. Well not exactly, its 766 bytes and filled with nulls (0x00). So the input is invalid.

  2. 2019-11-13 18:23:26,733 - root - ERROR - Failed to parse e:/steam\steamapps\appmanifest_416680.acf
    Traceback (most recent call last):
    File "C:\Users\usuario\AppData\Local\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\client.py", line 212, in get_app_id
    return config["AppState"]["appid"]
    File "C:\Users\usuario\AppData\Local\GOG.com\Galaxy\plugins\installed\steam_ca27391f-2675-49b1-92c0-896d43afa4f8\client.py", line 17, in __getitem__
    return super().__getitem__(key.lower())
    KeyError: 'appstate'

    This is error comes from other code thats not the vdf package.