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

Recover downloads from suggested file name bug #3690

Closed
shyba opened this issue Oct 17, 2022 · 0 comments · Fixed by #3695
Closed

Recover downloads from suggested file name bug #3690

shyba opened this issue Oct 17, 2022 · 0 comments · Fixed by #3695
Assignees

Comments

@shyba
Copy link
Member

shyba commented Oct 17, 2022

Current release has a bug for new streams with suggested file name missing. When combined with save_files=True , they create lbry_download files on Downloads folder with missing mime type etc
This is fixed on #3686 for new streams, but we lack a way to recover those that turned bad downloads.

Given:
bad file downloaded from before #3686 (like the ones listed at #3681) w/ lbry_download files generated from that bug
lbry://@jimakudaio#9/Youtube-Google-Whistleblower-Reveals-A-Dangerous-Agenda!#0 is an example

When:
using a fixed version after #3686 :

  • files are still not playable (wrong file name probably, need to check the app)
  • some of them raise errors (fallback code hits a bad value from previous run)
2022-10-17 15:05:11,428 ERROR    lbry.file.file_manager:257: Unexpected error downloading stream:                                                                                                                  
Traceback (most recent call last):                                                                                                                                                                                 
  File "/home/user/lbry/lbry-sdk/lbry/file/file_manager.py", line 217, in download_from_uri                                                                                                                        
    await stream.start(timeout, save_file)                                                                                                                                                                         
  File "/home/user/lbry/lbry-sdk/lbry/stream/managed_stream.py", line 177, in start                                                                                                                                
    self._file_name or sanitize_file_name(self.suggested_file_name)                                                                                                                                                
  File "/home/user/lbry/lbry-sdk/lbry/stream/managed_stream.py", line 91, in suggested_file_name                                                                                                                   
    self.stream_claim_info.claim.stream.source.name))                                                                                                                                                              
  File "/home/user/lbry/lbry-sdk/lbry/stream/descriptor.py", line 70, in sanitize_file_name                                                                                                                        
    file_name, ext = os.path.splitext(dirty_name)                                                                                                                                                                  
  File "/home/user/.pyenv/versions/3.7-dev/lib/python3.7/posixpath.py", line 122, in splitext                                                                                                                      
    p = os.fspath(p)                                                                                                                                                                                               
TypeError: expected str, bytes or os.PathLike object, not NoneType  

Expected:

  • playback of already downloaded bad files work (should we rename?)
  • no errors
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

Successfully merging a pull request may close this issue.

1 participant