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

ZeroDivisionError: division by zero #10

Closed
ryohorie opened this issue Jan 13, 2022 · 2 comments
Closed

ZeroDivisionError: division by zero #10

ryohorie opened this issue Jan 13, 2022 · 2 comments

Comments

@ryohorie
Copy link

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/ryohorie/pj/melody/firestoreBackup/firestore-export-json/fs_to_json.py", line 14, in <module>
    main()
  File "/Users/ryohorie/pj/melody/firestoreBackup/firestore-export-json/fs_to_json.py", line 10, in main
    command.main(args=args)
  File "/Users/ryohorie/pj/melody/firestoreBackup/firestore-export-json/converter/command.py", line 93, in main
    process_files(
  File "/Users/ryohorie/pj/melody/firestoreBackup/firestore-export-json/converter/command.py", line 113, in process_files
    p.map(f, files)
  File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 771, in get
    raise self._value
@ryohorie
Copy link
Author

I temporarily fixed it this way.

command.py line:148

    print(
        f"progress: {num_files_processed.value}/{num_files.value} {num_files_processed.value/num_files.value*100}%"
    )

    if num_files.value > 0:
        print(
            f"progress: {num_files_processed.value}/{num_files.value} {num_files_processed.value/num_files.value*100}%"
        )

bcye added a commit to bcye/firestore-export-json that referenced this issue Feb 13, 2022
labbots pushed a commit that referenced this issue Feb 14, 2022
@labbots
Copy link
Owner

labbots commented Feb 14, 2022

@bcye thanks for the fix

@labbots labbots closed this as completed Feb 14, 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