Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.00 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. CancelledError Traceback (most recent call last)
  3. ~/Documents/src/twint/twint/get.py in Response(session, url, params)
  4. 161 with timeout(30):
  5. --> 162 async with session.get(url, ssl=False, params=params, proxy=httpproxy) as response:
  6. 163 return await response.text()
  7.  
  8. ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/client.py in __aenter__(self)
  9. 1004 async def __aenter__(self) -> _RetType:
  10. -> 1005 self._resp = await self._coro
  11. 1006 return self._resp
  12.  
  13. ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/client.py in _request(self, method, str_or_url, params, data, json, cookies, headers, skip_auto_headers, auth, allow_redirects, max_redirects, compress, chunked, expect100, raise_for_status, read_until_eof, proxy, proxy_auth, timeout, verify_ssl, fingerprint, ssl_context, ssl, proxy_headers, trace_request_ctx)
  14. 475 traces=traces,
  15. --> 476 timeout=real_timeout
  16. 477 )
  17.  
  18. ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/connector.py in connect(self, req, traces, timeout)
  19. 521 try:
  20. --> 522 proto = await self._create_connection(req, traces, timeout)
  21. 523 if self._closed:
  22.  
  23. ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/connector.py in _create_connection(self, req, traces, timeout)
  24. 853 _, proto = await self._create_direct_connection(
  25. --> 854 req, traces, timeout)
  26. 855
  27.  
  28. ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/connector.py in _create_direct_connection(self, req, traces, timeout, client_error)
  29. 973 local_addr=self._local_addr,
  30. --> 974 req=req, client_error=client_error)
  31. 975 except ClientConnectorError as exc:
  32.  
  33. ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/connector.py in _wrap_create_connection(self, req, timeout, client_error, *args, **kwargs)
  34. 923 Tuple[asyncio.Transport, ResponseHandler],
  35. --> 924 await self._loop.create_connection(*args, **kwargs))
  36. 925 except cert_errors as exc:
  37.  
  38. ~/anaconda3/envs/twitter_scraping/lib/python3.6/asyncio/base_events.py in create_connection(self, protocol_factory, host, port, ssl, family, proto, flags, sock, local_addr, server_hostname)
  39. 780 logger.debug("connect %r to %r", sock, address)
  40. --> 781 yield from self.sock_connect(sock, address)
  41. 782 except OSError as exc:
  42.  
  43. ~/anaconda3/envs/twitter_scraping/lib/python3.6/asyncio/selector_events.py in sock_connect(self, sock, address)
  44. 438 self._sock_connect(fut, sock, address)
  45. --> 439 return (yield from fut)
  46. 440
  47.  
  48. CancelledError:
  49.  
  50. During handling of the above exception, another exception occurred:
  51.  
  52. TimeoutError Traceback (most recent call last)
  53. <ipython-input-16-9b996182bcac> in <module>
  54. 4 c1.Username = user
  55. 5 c1.Store_object = True
  56. ----> 6 twint.run.Following(c1)
  57. 7 ego_network.extend(twint.output.follows_list)
  58. 8 time.sleep(60)
  59.  
  60. ~/Documents/src/twint/twint/run.py in Following(config)
  61. 252 config.Favorites = False
  62. 253 config.TwitterSearch = False
  63. --> 254 run(config)
  64. 255 if config.Pandas_au:
  65. 256 storage.panda._autoget("following")
  66.  
  67. ~/Documents/src/twint/twint/run.py in run(config, callback)
  68. 211 def run(config, callback=None):
  69. 212 logme.debug(__name__+':run')
  70. --> 213 get_event_loop().run_until_complete(Twint(config).main(callback))
  71. 214
  72. 215 def Favorites(config):
  73.  
  74. ~/anaconda3/envs/twitter_scraping/lib/python3.6/asyncio/base_events.py in run_until_complete(self, future)
  75. 482 raise RuntimeError('Event loop stopped before Future completed.')
  76. 483
  77. --> 484 return future.result()
  78. 485
  79. 486 def stop(self):
  80.  
  81. ~/Documents/src/twint/twint/run.py in main(self, callback)
  82. 152 task.add_done_callback(callback)
  83. 153
  84. --> 154 await task
  85. 155
  86. 156 async def run(self):
  87.  
  88. ~/Documents/src/twint/twint/run.py in run(self)
  89. 187 if self.config.Followers or self.config.Following:
  90. 188 logme.debug(__name__+':Twint:main:follow')
  91. --> 189 await self.follow()
  92. 190 elif self.config.Favorites:
  93. 191 logme.debug(__name__+':Twint:main:favorites')
  94.  
  95. ~/Documents/src/twint/twint/run.py in follow(self)
  96. 107
  97. 108 async def follow(self):
  98. --> 109 await self.Feed()
  99. 110 if self.config.User_full:
  100. 111 logme.debug(__name__+':Twint:follow:userFull')
  101.  
  102. ~/Documents/src/twint/twint/run.py in Feed(self)
  103. 55 consecutive_errors_count = 0
  104. 56 while True:
  105. ---> 57 response = await get.RequestUrl(self.config, self.init, headers=[("User-Agent", self.user_agent)])
  106. 58 if self.config.Debug:
  107. 59 print(response, file=open("twint-last-request.log", "w", encoding="utf-8"))
  108.  
  109. ~/Documents/src/twint/twint/get.py in RequestUrl(config, init, headers)
  110. 116 logme.debug(__name__+':RequestUrl:Favorites')
  111. 117 _url = await url.Favorites(config.Username, init)
  112. --> 118 response = await MobileRequest(_url, connector=_connector)
  113. 119 _serialQuery = _url
  114. 120
  115.  
  116. ~/Documents/src/twint/twint/get.py in MobileRequest(url, **options)
  117. 132 logme.debug(__name__+':MobileRequest:notConnector')
  118. 133 async with aiohttp.ClientSession() as session:
  119. --> 134 return await Response(session, url)
  120. 135
  121. 136 def ForceNewTorIdentity(config):
  122.  
  123. ~/Documents/src/twint/twint/get.py in Response(session, url, params)
  124. 161 with timeout(30):
  125. 162 async with session.get(url, ssl=False, params=params, proxy=httpproxy) as response:
  126. --> 163 return await response.text()
  127. 164
  128. 165 async def RandomUserAgent():
  129.  
  130. ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/async_timeout/__init__.py in __exit__(self, exc_type, exc_val, exc_tb)
  131. 43 exc_val: BaseException,
  132. 44 exc_tb: TracebackType) -> Optional[bool]:
  133. ---> 45 self._do_exit(exc_type)
  134. 46 return None
  135. 47
  136.  
  137. ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/async_timeout/__init__.py in _do_exit(self, exc_type)
  138. 90 self._cancel_handler = None
  139. 91 self._task = None
  140. ---> 92 raise asyncio.TimeoutError
  141. 93 if self._timeout is not None and self._cancel_handler is not None:
  142. 94 self._cancel_handler.cancel()
  143.  
  144. TimeoutError:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement