TypeError: gather() takes 2 positional arguments but 427 were given
Getting the following error about gather:
I note that the "427 given" is the number of posts the creator has plus 1(426+1). I'm getting this error for every page now.
No Stories Found.
Type: Posts
Scrape Attempt: 1/100
Type: Archived Posts
Processing Scraped Posts
Traceback (most recent call last):
File "D:\OnlyFans2\start_ofd.py", line 60, in <module>
loop.run_until_complete(main())
File "C:\Users\[HOSTNAME]\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "D:\OnlyFans\start_ofd.py", line 44, in main
api = await main_datascraper.start_datascraper(
File "D:\OnlyFans\datascraper\main_datascraper.py", line 93, in start_datascraper
await main_helper.process_names(
File "D:\OnlyFans\helpers\main_helper.py", line 939, in process_names
result = await module.start_datascraper(authed, username, site_name)
File "D:\OnlyFans\modules\onlyfans.py", line 160, in start_datascraper
await prepare_scraper(authed, site_name, item)
File "D:\OnlyFans\modules\onlyfans.py", line 823, in prepare_scraper
unrefined_set = await tqdm.gather(*tasks, **settings)
TypeError: gather() takes 2 positional arguments but 427 were given
This only occurs when I select all. I also had to remove the initial scrape it does of all the profiles or it threw another gather() error at like 420 or so.
I keep getting something similar
Traceback (most recent call last):
File "P:\OnlyFans-7.4.1\start_ofd.py", line 60, in
loop.run_until_complete(main())
File "C:\Users\[name]\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "P:\OnlyFans-7.4.1\start_ofd.py", line 44, in main
api = await main_datascraper.start_datascraper(
File "P:\OnlyFans-7.4.1\datascraper\main_datascraper.py", line 90, in start_datascraper
await module.paid_content_scraper(api, identifiers)
File "P:\OnlyFans-7.4.1\modules\onlyfans.py", line 401, in paid_content_scraper
unrefined_set = await tqdm.gather(*tasks, **settings)
TypeError: gather() takes 2 positional arguments but 6 were given
@Poddi That's not the same issue. Your issue is "TypeError: object list can't be used in 'await' expression".
@JbManny @Dered118 Seems to be an issue with the update made 16 days ago bumping up the version of tdqm to 4.62.
I fixed it by undoing the changes of this commit: https://github.com/DIGITALCRIMINAL/OnlyFans/commit/9917a3578f7dc9770cb9c2c4592a591b028e5fb3
Then I updated the modules using pip install --upgrade --user -r requirements.txt
That worked, there seems to be an issue with the version of tdqm being used and how the scripts call it.
AFAIK @JbManny & @Dered118's issues are due to pulling the latest version of this repo without installing its dependencies. Reverting 9917a35 will cause @Poddi's issue (and all future users).
Updating it using the requirements text was the first thing I did. Didn't help one thing.
AFAIK @JbManny & @Dered118's issues are due to pulling the latest version of this repo without installing its dependencies. Reverting 9917a35 will cause @Poddi's issue (and all future users).
Makes a lot of sense, should have checked that first.
@JbManny did you delete the currently installed version of tdqm and then run the requirments again?
Nope, completely removed all the required modules, then cloned a fresh copy of the repo and installed requirements.txt again, only to be greeted by the same error. I don't think that this is a case of missing dependencies after pulling changes to the repo @casperdcl
Is anyone else experiencing this?
Steps to reproduce for me:
- From the old repository with different dependencies, remove all dependencies from previous versions of the repo:
pip uninstall -r requirements.txt -y - Clone newest version of repo, install dependencies.
- Run the program.
There is a fix for this, and it should lie with one of the requirements. First I need to know what platform you are using. Windows, Linux or Docker?
WARNING: The script tqdm.exe is installed in 'C:\Users\XXXX\AppData\Roaming\Python\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script alembic.exe is installed in 'C:\Users\XXXX\AppData\Roaming\Python\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
I run the script from any directory with the env variable. Anyone know how to fix this?
TypeError: gather() takes 2 positional arguments but 144 were given
anything? im running 4.7.1. Tried downgrading tdqm, but nothing helps
EDIT: got it to work on tdqm version 4.62.1
Awesome! would you mind closing this?
should work with tqdm>=4.62.0
should work with
tqdm>=4.62.0
Lets build from this for now. https://github.com/DIGITALCRIMINALS/OnlyFans