JimmXinu / FanFicFare

FanFicFare is a tool for making eBooks from stories on fanfiction and other web sites.
Other
750 stars 161 forks source link

BrowserCache is not working on both CLI and Calibre #849

Closed Twilight666 closed 2 years ago

Twilight666 commented 2 years ago

Yesterday all of a sudden BrowserCache stopped working for all FFnet stories The error I get is:

Traceback (most recent call last): File "C:\Python3.7\lib\site-packages\fanficfare\browsercache\basebrowsercache.py", line 180, in get_key_mapping self.do_map_cache_keys() File "C:\Python3.7\lib\site-packages\fanficfare\browsercache\basebrowsercache.py", line 51, in profiled_func result = func(*args, **kwargs) File "C:\Python3.7\lib\site-packages\fanficfare\browsercache\basebrowsercache.py", line 120, in do_map_cache_keys self.map_cache_keys() File "C:\Python3.7\lib\site-packages\fanficfare\browsercache\blockfilecache.py", line 85, in map_cache_keys cacheaddr = CacheAddress(entry.next, path=self.cache_dir) File "C:\Python3.7\lib\site-packages\fanficfare\browsercache\chromagnon\cacheAddress.py", line 70, in init raise CacheAddressError("Uninitialized Address") fanficfare.browsercache.chromagnon.cacheAddress.CacheAddressError: 'Uninitialized Address'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Python3.7\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Python3.7\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\Python3.7\Scripts\fanficfare.exe__main.py", line 7, in File "C:\Python3.7\lib\site-packages\fanficfare\cli.py", line 344, in main dispatch(options, urls, passed_defaultsini, passed_personalini, warn, fail) File "C:\Python3.7\lib\site-packages\fanficfare\cli.py", line 325, in dispatch fail) File "C:\Python3.7\lib\site-packages\fanficfare\cli.py", line 435, in do_download adapter.getStoryMetadataOnly() File "C:\Python3.7\lib\site-packages\fanficfare\adapters\base_adapter.py", line 308, in getStoryMetadataOnly self.doExtractChapterUrlsAndMetadata(get_cover=get_cover) File "C:\Python3.7\lib\site-packages\fanficfare\adapters\adapter_fanfictionnet.py", line 114, in doExtractChapterUrlsAndMetadata data = self.get_request(url) File "C:\Python3.7\lib\site-packages\fanficfare\requestable.py", line 115, in get_request usecache)[0] File "C:\Python3.7\lib\site-packages\fanficfare\requestable.py", line 108, in get_request_redirected usecache=usecache)[:2] File "C:\Python3.7\lib\site-packages\fanficfare\fetcher.py", line 401, in get_request_redirected usecache=usecache) File "C:\Python3.7\lib\site-packages\fanficfare\fetcher.py", line 245, in fetcher_do_request usecache=usecache) File "C:\Python3.7\lib\site-packages\fanficfare\fetcher.py", line 272, in fetcher_do_request d = self.cache.get_data(url) File "C:\Python3.7\lib\site-packages\fanficfare\browsercache\init__.py", line 29, in get_data d = self.browser_cache.get_data(url) File "C:\Python3.7\lib\site-packages\fanficfare\browsercache\basebrowsercache.py", line 188, in get_data key = self.get_key_mapping(self.minimal_url(url)) File "C:\Python3.7\lib\site-packages\fanficfare\browsercache\basebrowsercache.py", line 183, in get_key_mapping raise BrowserCacheException("Browser Cache Failed to Load with error '%s'"%e) fanficfare.browsercache.basebrowsercache.BrowserCacheException: Browser Cache Failed to Load with error ''Uninitialized Address''

I had made no changes in personal.ini or anywhere else for weeks, and I don't understand what exactly the above means to make any actions to fix it I am pretty sure it's not a problem for FFF but that something happened on my end The reason I think that is that at one point when I was using my desktop I tried to download a story and it worked, but when I went back to my laptop (that gave the above error) it was still the same I have checked multiple stories and it's exactly the same. They download just fine on the Desktop PC and give the above error on the Laptop Personal.ini for both is basically the same, other than the paths to the cache and the save location, and I have checked and the I am using a Cache\Cache_Data folder that has files with todays modification date (so I am in the correct profile since the others have much older dates) Also when it comes to BrowserCache the options I have set are under [defaults]:

browser_cache_path: C:\Users\\appdata\local\Google\Chrome\User Data\Default\Cache\Cache_Data

under [fanfiction.net]:

use_basic_cache:true use_browser_cache: true use_browser_cache_only:true

JimmXinu commented 2 years ago

FFF is failing to read the browser cache, it's bumping into a address that hasn't been initialized.

Honestly, I don't understand the intricacies of the browser cache reading code--and we have three different versions.

About all I can recommend is clearing your browser cache and trying again. Or trying a different browser or different browser profile.

Twilight666 commented 2 years ago

Deleting the Cache didn't work Deleting every file in the Cache_Data folder manually did

I have since successfully downloaded a couple of FFnet stories without issue, so thanks And I guess you can close this since there isn't anything you can do if this is Chrome's f#ckup