rconroy293 / mtga-log-client

GNU General Public License v3.0
61 stars 25 forks source link

Player.log with MTGA from Steam throws parsing error #138

Closed Ingo-FP-Angel closed 1 year ago

Ingo-FP-Angel commented 1 year ago

I've just installed Arena via Steam and tried to parse the log via

seventeenlands -l $STEAMROOT/steamapps/compatdata/2141910/pfx/drive_c/users/steamuser/AppData/LocalLow/Wizards\ Of\ The\ Coast/MTGA/Player.log

It starts to parse but then runs into an exception. Last part of the output is

20230529 142240,INFO,201 Response: Successfully submitted rank info
20230529 142240,INFO,Submitting mastery progress
20230529 142240,INFO,201 Response: Successfully updated progress
Traceback (most recent call last):
  File "/home/ingo/.local/bin/seventeenlands", line 8, in <module>
    sys.exit(main())
  File "/home/ingo/.local/lib/python3.6/site-packages/seventeenlands/mtga_follower.py", line 1165, in main
    processing_loop(args, token)
  File "/home/ingo/.local/lib/python3.6/site-packages/seventeenlands/mtga_follower.py", line 1135, in processing_loop
    follower.parse_log(filename=filename, follow=follow)
  File "/home/ingo/.local/lib/python3.6/site-packages/seventeenlands/mtga_follower.py", line 283, in parse_log
    self.__append_line(line)
  File "/home/ingo/.local/lib/python3.6/site-packages/seventeenlands/mtga_follower.py", line 338, in __append_line
    self.cur_log_time = extract_time(self.last_raw_time)
  File "/home/ingo/.local/lib/python3.6/site-packages/seventeenlands/mtga_follower.py", line 159, in extract_time
    raise ValueError(f'Unsupported time format: "{time_str}"')
ValueError: Unsupported time format: "--"

The line that is causing this error is [UnityCrossThreadLogger]-- Product List --.

Or with a bit more context:

[UnityCrossThreadLogger]==> LogBusinessEvents {"id":"6cce4610-0e7d-45fa-b885-5906ceb9a861","request":"{\"Type\":1912,\"TransId\":\"6cce4610-0e7d-45fa-b885-5906ceb9a861\",\"Payload\":\"{\\\"Context\\\":\\\"PlayerUpdateStoreSku\\\",\\\"EventType\\\":22,\\\"EventTime\\\":\\\"2023-05-29T11:36:13.0580413Z\\\"}\"}"}

[UnityCrossThreadLogger]29.05.2023 13:36:13
<== LogBusinessEvents(6cce4610-0e7d-45fa-b885-5906ceb9a861)
Success

[UnityCrossThreadLogger]GeneralStore Initializing

[UnityCrossThreadLogger]OnInitialized

[UnityCrossThreadLogger]-- Product List --
id  price   available
Bundle_Adventurer   16,49   True
MTGA-StarterBundle  5,49    True
MTGA-Gems-003   21,99   True
MTGA-Gems-004   53,99   True
MTGA-Gems-005   107,99  True
MTGA-Gems-001   5,49    True
MTGA-Gems-002   10,99   True

My version of the log client is 0.1.38.

riQQ commented 1 year ago

Update your log client, it's outdated. This was fixed with 87789cb28032b0ef18b693fa55af9a4e0eaed6ba / 0.1.39.

Ingo-FP-Angel commented 1 year ago

Thanks a lot, that works. Sorry for the noise.