anime-dl / anime-downloader

A simple but powerful anime downloader and streamer.
The Unlicense
1.92k stars 218 forks source link

Fix 'CachedResponse has no len()' error #701

Closed AutumnalModding closed 3 years ago

AutumnalModding commented 3 years ago

Closes #694.

ArjixWasTaken commented 3 years ago

I cba to test this (bc I'm away from home). But the most major flaw that I found in this PR is that it doesn't deal with the issue at hand. This error occurs because of the package we use to cache the requests we make, requests-cache. That package has moved a class from one place to another. So anime-dl fails to cache any request. To fix this we can either force the use of an older version of requests-cache or to add a try except in order to keep compatibility with both the old and new versions of requests-cache. So what you should be looking to fix is in session.py. There is a small chance that I'm wrong about this, but installing an older version of that package fixes this error. ~~Edit: Now that I'm back and tested the requests-cache package, it does not do a breaking change but for some reason the latest versions produce this error hmm~~ anyways, ill do some more testing

Edit: I was completely wrong, this PR is ready to merge.