Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

aiohttp_socks update breaks functions #831

Closed
ghost opened this issue Jul 16, 2020 · 7 comments
Closed

aiohttp_socks update breaks functions #831

ghost opened this issue Jul 16, 2020 · 7 comments

Comments

@ghost
Copy link

ghost commented Jul 16, 2020

The latest release of aiohttp_socks breaks the twint usage entirely. It is temporarilty fixed by using aiohttp_socks<=0.4.1, unless the code is reworked. The favorites grabbing function still is unusable. Cant get a wrap around how to fix that though

@TianshuangQiu
Copy link

Experiencing the same problem, how did you fix it using aiohttp_socks<=0.4.1 ?

@alexgmm
Copy link

alexgmm commented Jul 17, 2020

@TianshuangQiu clone the repository, change the version in the requirements file and proceed to install. Worked for me

@MiltonCalamaro
Copy link

Yes, clone the repository and change the file requirements.txt , instead of aiohttp_socks to aiohttp_socks<=0.4.1

@Theo1996
Copy link

aiohttp_socks<=0.4.1 seems to fix it

@Theo1996
Copy link

twint -u foxopen32 --following --user-full <- works for some reason
E:\Desktop\twint\twint>twint -u foxopen32 < doesnt work

E:\Desktop\twint\twint>twint -u foxopen32 --following <-doesnt work
Traceback (most recent call last):
File "e:\python\python38\lib\site-packages\twint\get.py", line 149, in Response
return await response.text()
File "e:\python\python38\lib\site-packages\aiohttp\client_reqrep.py", line 1009, in text
await self.read()
File "e:\python\python38\lib\site-packages\aiohttp\client_reqrep.py", line 973, in read
self._body = await self.content.read()
File "e:\python\python38\lib\site-packages\aiohttp\streams.py", line 358, in read
block = await self.readany()
File "e:\python\python38\lib\site-packages\aiohttp\streams.py", line 380, in readany
await self._wait('readany')
File "e:\python\python38\lib\site-packages\aiohttp\streams.py", line 296, in _wait
await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\Python\Python38\Scripts\twint-script.py", line 11, in
load_entry_point('twint==2.1.20', 'console_scripts', 'twint')()
File "e:\python\python38\lib\site-packages\twint\cli.py", line 311, in run_as_command
main()
File "e:\python\python38\lib\site-packages\twint\cli.py", line 274, in main
run.Following(c)
File "e:\python\python38\lib\site-packages\twint\run.py", line 322, in Following
run(config)
File "e:\python\python38\lib\site-packages\twint\run.py", line 283, in run
get_event_loop().run_until_complete(Twint(config).main(callback))
File "e:\python\python38\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "e:\python\python38\lib\site-packages\twint\run.py", line 209, in main
await task
File "e:\python\python38\lib\site-packages\twint\run.py", line 247, in run
await self.follow()
File "e:\python\python38\lib\site-packages\twint\run.py", line 120, in follow
await self.Feed()
File "e:\python\python38\lib\site-packages\twint\run.py", line 45, in Feed
response = await get.RequestUrl(self.config, self.init, headers=[("User-Agent", self.user_agent)])
File "e:\python\python38\lib\site-packages\twint\get.py", line 119, in RequestUrl
response = await Request(_url, params=params, connector=connector, headers=headers)
File "e:\python\python38\lib\site-packages\twint\get.py", line 143, in Request
return await Response(session, url, params)
File "e:\python\python38\lib\site-packages\twint\get.py", line 149, in Response
return await response.text()
File "e:\python\python38\lib\site-packages\async_timeout_init
.py", line 45, in exit
self.do_exit(exc_type)
File "e:\python\python38\lib\site-packages\async_timeout_init
.py", line 92, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

pielco11 added a commit that referenced this issue Jul 20, 2020
@pielco11
Copy link
Member

Thank you @june1994 for reporting this; I edited requirements.txt accordingly to the suggestions

@ghost
Copy link
Author

ghost commented Jul 20, 2020

Thanks @pielco11. Please see if the favorite functionality works. That issue seems open still and I am not able by any means

@ghost ghost closed this as completed Jul 20, 2020
minamotorin added a commit to minamotorin/twint that referenced this issue Mar 8, 2022
Fix #6
Solution is from twintproject#1360 (comment)

I'm not sure about twintproject#831, but it seems work fine with also aiohttp_socks 0.4.1 or later.
Version limitation of aiohttp_socks was added by commit twintproject@fef94a5
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants