scholarly-python-package / scholarly

Retrieve author and publication information from Google Scholar in a friendly, Pythonic way without having to worry about CAPTCHAs!
https://scholarly.readthedocs.io/
The Unlicense
1.3k stars 292 forks source link

Error: get_proxy_list() missing 1 required positional argument: 'repeat' #454

Closed shaunster0 closed 1 year ago

shaunster0 commented 1 year ago

When I try to run pg = ProxyGenerator() success = pg.FreeProxies()

I get this error "TypeError: get_proxy_list() missing 1 required positional argument: 'repeat'"

image

It also appears when I run the project tests straight after installation-

python3 -m unittest -v test_module.py test_luminati (test_module.TestLuminati) Test that we can set up Luminati (Bright Data) successfully ... skipped 'No Luminati credentials found.' ERROR ERROR test_scraperapi (test_module.TestScraperAPI) Test that we can set up ScraperAPI successfully ... skipped 'No ScraperAPI key found' test_tor_launch_own_process (test_module.TestTorInternal) Test that we can launch a Tor process ... skipped 'Tor executable not found'

====================================================================== ERROR: setUpClass (test_module.TestScholarly)

Traceback (most recent call last): File "/home/shaun/libraries/scholarly/test_module.py", line 90, in setUpClass pg.FreeProxies() File "/home/shaun/libraries/scholarly/scholarly/_proxy_generator.py", line 524, in FreeProxies proxy = self._proxy_gen(None) # prime the generator File "/home/shaun/libraries/scholarly/scholarly/_proxy_generator.py", line 485, in _fp_coroutine all_proxies = freeproxy.get_proxy_list() TypeError: get_proxy_list() missing 1 required positional argument: 'repeat'

====================================================================== ERROR: setUpClass (test_module.TestScholarlyWithProxy)

Traceback (most recent call last): File "/home/shaun/libraries/scholarly/test_module.py", line 577, in setUpClass scholarly.use_proxy(None) File "/home/shaun/libraries/scholarly/scholarly/_scholarly.py", line 78, in use_proxy self.__nav.use_proxy(proxy_generator, secondary_proxy_generator) File "/home/shaun/libraries/scholarly/scholarly/_navigator.py", line 67, in use_proxy proxy_works = self.pm2.FreeProxies() File "/home/shaun/libraries/scholarly/scholarly/_proxy_generator.py", line 524, in FreeProxies proxy = self._proxy_gen(None) # prime the generator File "/home/shaun/libraries/scholarly/scholarly/_proxy_generator.py", line 485, in _fp_coroutine all_proxies = freeproxy.get_proxy_list() TypeError: get_proxy_list() missing 1 required positional argument: 'repeat'


Ran 3 tests in 0.001s

FAILED (errors=2, skipped=3)

Desktop (please complete the following information):

Do you plan on contributing? No

arunkannawadi commented 1 year ago

A dependency of this package released a new minor version that broke backward compatibility! Try installing v1.0.6 of free-proxy instead of the more recent 1.1.0. There'll be a fix to scholarly soon that will work with the more recent version soon.

arunkannawadi commented 1 year ago

Just released v1.7.4 which should not have this error. It can be downloaded from Github right away, and should be available via pip and conda in a couple of hours. Leaving this issue open for now until we find a proper fix.

shaunster0 commented 1 year ago

thanks @arunkannawadi!! Btw, I tested downgrading free-proxy to 1.0.6 as u suggested, and it seemed to fix the issue