KeyError: 'piece_size' in fileNeed command in BigfilePlugin when try to download non-optional files with |all#2179
Merged
HelloZeroNet merged 1 commit intoHelloZeroNet:py3from Aug 30, 2019
krzotr:patch-4
Merged
KeyError: 'piece_size' in fileNeed command in BigfilePlugin when try to download non-optional files with |all#2179HelloZeroNet merged 1 commit intoHelloZeroNet:py3from krzotr:patch-4
fileNeed command in BigfilePlugin when try to download non-optional files with |all#2179HelloZeroNet merged 1 commit intoHelloZeroNet:py3from
krzotr:patch-4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 1: Please describe your environment
Step 2: Describe the problem:
I try to use
fileNeedcommand with|allto downloaddata/mp4-redditgifs/9450.mp4file from address1Gif7PqWTzVWDQ42Mo7np3zXmGAo3DXc7h. I received error{"error": "KeyError: piece_size"}Steps to reproduce:
I used fileNeed to try download file, the most important thing is
|allat the end.Observed Results:
As you can see in response I got
"error": "KeyError: piece_size". I enabled traceback:The problem is in
BigfilePlugin.pyinneedFilefunction.File
data/mp4-redditgifs/9450.mp4is not marked asoptional fileandpiece_sizedoes not exist incontent.jsonfile, check1Gif7PqWTzVWDQ42Mo7np3zXmGAo3DXc7h/content.json:Expected Results:
If file is not marked as optional should be downloaded correcty with
|allat the end.I created patch which fixed this problem. If
piece_sizeindex does not exist infile_info- just use defaultneedFilefunction fromSitePlugin