Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log file format broken by latest MTGA update #33

Open
pak21 opened this issue Aug 28, 2021 · 9 comments
Open

Log file format broken by latest MTGA update #33

pak21 opened this issue Aug 28, 2021 · 9 comments

Comments

@pak21
Copy link
Contributor

pak21 commented Aug 28, 2021

Wizards broke the file format parsing again :-(

$ ProgramFiles=/mnt/windows/Program\ Files/ ./import-collection.py 
Traceback (most recent call last):
  File "/home/philip/mtga/mtga-utils/mtga_log.py", line 107, in get_last_json_block
    return self._list_to_json(block)
  File "/home/philip/mtga/mtga-utils/mtga_log.py", line 114, in _list_to_json
    return json.loads(json_string)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/philip/mtga/mtga-utils/./import-collection.py", line 24, in <module>
    main()
  File "/home/philip/mtga/mtga-utils/./import-collection.py", line 16, in main
    for mtga_id, card, count in log.get_collection():
  File "/home/philip/mtga/mtga-utils/mtga_log.py", line 145, in get_collection
    collection = self.get_last_json_block('<== ' + MTGA_COLLECTION_KEYWORD)
  File "/home/philip/mtga/mtga-utils/mtga_log.py", line 109, in get_last_json_block
    raise MtgaLogParsingError(exception)
mtga_log.MtgaLogParsingError: Expecting value: line 1 column 1 (char 0)

I will investigate, but due to Real Life I won't have a chance to look at it properly until Monday 2021-08-30. This has broken a number of the trackers as well, so it's not just us...

@kelesi
Copy link
Owner

kelesi commented Aug 29, 2021

Seems like whole PlayerInventory section is gone from the log. So far we cannot do much until an equivallent is being logged by Arena.
https://feedback.wizards.com/forums/918667-mtg-arena-bugs-product-suggestions/suggestions/44050746-broken-logs-in-2021-8-0-3855

@pak21
Copy link
Contributor Author

pak21 commented Aug 29, 2021

Yeah, that was my initial conclusion after looking at the log files I had last night - I hoped I was missing something but apparently not :-(

I think I can reconstruct some of the functionality (e.g. the getInventory call for vault progress) but it looks like the collection call is gone for now which is the thing I think we want the most...

@pak21
Copy link
Contributor Author

pak21 commented Sep 5, 2021

Small progress update: I haven't made any real progress on log file parsing, but have updated my fork of python-mtga to handle the changes in the latest Arena update (Wizards made a bunch of previously mandatory fields optional so we couldn't load the card database...)

@zyll71
Copy link

zyll71 commented Mar 25, 2022

Has there been any progress or did the change break this project?

@pak21
Copy link
Contributor Author

pak21 commented Mar 25, 2022

I've looked at it, but don't believe the inventory is in the log :-( so yes, this does fundamentally break this major part of the project.

AetherHub do manage to get the inventory somehow, but I don't know how they do it.

@kelesi
Copy link
Owner

kelesi commented Mar 28, 2022

@pak21 Untapped.gg seems to also get the card inventory somehow. I wonder how they do it.

@lanmaster53
Copy link

Any progress on this?

@pak21
Copy link
Contributor Author

pak21 commented Feb 11, 2023

@lanmaster53 Not from me I'm afraid, I've stopped playing Arena so this isn't on my priority list any more.

@lanmaster53
Copy link

@lanmaster53 Not from me I'm afraid, I've stopped playing Arena so this isn't on my priority list any more.

If you've got any notes on what you've done to this point, I don't mind digging some more. All of the other agents are doing it somehow. They must be using a different log. I cannot find any evidence of collection cards in that log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants