AttributeError: type object 'MediaDownloader' has no attribute 'global_counter'
alemelis opened this issue · comments
Hello, getting the following error when trying to run the example from the readme
$ python3.9 download.py --subreddit pics --sort_by top --sort_time all --max_post_downloads 40 --download_dir ./images
Downloading 40 posts from /r/pics sorted by top|all to ./images/pics/
pics|top|all|n=40: 0%| | 0/40 [00:00<?, ?it/s]multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.9/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/local/Cellar/python@3.9/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/Users/alemelis/WallpapersFromReddit/downloaders.py", line 41, in download_post
if MediaDownloader.global_counter.get_counter_value() >= MediaDownloader.max_posts_download:
AttributeError: type object 'MediaDownloader' has no attribute 'global_counter'
"""
I'm on macOS 12.5.1, running python3.9 (same error with 3.8 and 3.10)