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

Problem with the Verify command #412

Closed
MinerPL opened this issue Mar 5, 2022 · 3 comments
Closed

Problem with the Verify command #412

MinerPL opened this issue Mar 5, 2022 · 3 comments

Comments

@MinerPL
Copy link

MinerPL commented Mar 5, 2022

Platform

Operating system and version: Windows 11 Build 22557.1 (Dev Insider)
Legendary version (legendary -V): legendary version "0.20.25", codename "Our Benefactors"

Expected Behavior

Legendary should verify the current files

Current Behavior

Legendary throws error posted below

C:\Users\minerpl>legendary verify Fortnite
[cli] INFO: Loading installed manifest for "Fortnite"
[cli] INFO: Verifying "Fortnite" version "++Fortnite+Release-19.20-CL-18775446-Windows"
[cli] ERROR: File is missing: ".unsync/manifest.bin"
Traceback (most recent call last):
  File "C:\Users\minerpl\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\minerpl\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\minerpl\AppData\Local\Programs\Python\Python310\Scripts\legendary.exe\__main__.py", line 7, in <module>
  File "C:\Users\minerpl\AppData\Local\Programs\Python\Python310\lib\site-packages\legendary\cli.py", line 2935, in main
    cli.verify_game(args)
  File "C:\Users\minerpl\AppData\Local\Programs\Python\Python310\lib\site-packages\legendary\cli.py", line 1177, in verify_game
    speed = (processed - last_processed) / 1024 / 1024 / delta
ZeroDivisionError: float division by zero

Steps to Reproduce

  1. Import Fortnite from Epic Games
  2. Try verify Files
  3. Get error
@woctezuma
Copy link
Contributor

woctezuma commented Mar 5, 2022

Not sure why the error happens at line 1177. It should be at line 1181:

legendary/legendary/cli.py

Lines 1179 to 1182 in d7360ee

if (delta := ((current_time := time.time()) - last_update)) > 1 or not last_processed:
last_update = current_time
speed = (processed - last_processed) / 1024 / 1024 / delta
last_processed = processed

Thus, maybe update your version of legendary.


The error happens because delta is zero. That implies that:

  • the if-statement is True, which means that last_processed is 0 (or False),
  • time.time() returns the same value at these two lines:
    last_update = time.time()

    if (delta := ((current_time := time.time()) - last_update)) > 1 or not last_processed:

I am not sure how it is possible that the code runs so fast that the time is the same at both lines.

@MinerPL
Copy link
Author

MinerPL commented Mar 5, 2022

Thus, maybe update your version of legendary.

As far as I can see, I have the latest version.

@woctezuma
Copy link
Contributor

Right, the line difference must be due to this commit:

@derrod derrod closed this as completed in 3d1042e Mar 5, 2022
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

2 participants