mps-youtube / pafy

Python library to download YouTube content and retrieve metadata
1.39k stars 313 forks source link

AttributeError: module 'pafy.g' has no attribute 'lifespan' #289

Open Aneeqasif opened 3 years ago

Aneeqasif commented 3 years ago

`Traceback (most recent call last): File "/home/aneeq/.local/bin/mpsyt", line 33, in sys.exit(load_entry_point('mps-youtube==0.2.8', 'console_scripts', 'mpsyt')()) File "/home/aneeq/.local/bin/mpsyt", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load module = import_module(match.group('module')) File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/home/aneeq/.local/lib/python3.9/site-packages/mps_youtube/init.py", line 8, in init.init() File "/home/aneeq/.local/lib/python3.9/site-packages/mps_youtube/init.py", line 65, in init cache.load() File "/home/aneeq/.local/lib/python3.9/site-packages/mps_youtube/cache.py", line 34, in load pafy.load_cache(cached['pafy']) File "/home/aneeq/.local/lib/python3.9/site-packages/pafy/pafy.py", line 184, in load_cache set_categories(newcache.get('categories', {})) File "/home/aneeq/.local/lib/python3.9/site-packages/pafy/pafy.py", line 166, in set_categories idlist = [cid for cid, item in categories.items() File "/home/aneeq/.local/lib/python3.9/site-packages/pafy/pafy.py", line 167, in if item.get('updated', 0) < timestamp - g.lifespan] AttributeError: module 'pafy.g' has no attribute 'lifespan'

it was running just fine all of a sudden this happened `