InstaPy icon indicating copy to clipboard operation
InstaPy copied to clipboard

I get this error while using follow user followers

Open sader22 opened this issue 7 years ago • 22 comments

INFO [2019-03-05 21:27:17] [bahcesarayyapi] Starting to follow user Followers.. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" INFO [2019-03-05 21:27:17] [bahcesarayyapi] User 'gaziemirbel' [1/2] Traceback (most recent call last): File "D:\pyton\lib\site-packages\urllib3\connection.py", line 159, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw) File "D:\pyton\lib\site-packages\urllib3\util\connection.py", line 80, in create_connection raise err File "D:\pyton\lib\site-packages\urllib3\util\connection.py", line 70, in create_connection sock.connect(sa) ConnectionRefusedError: [WinError 10061] Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\pyton\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen chunked=chunked) File "D:\pyton\lib\site-packages\urllib3\connectionpool.py", line 354, in _make_request conn.request(method, url, **httplib_request_kw) File "D:\pyton\lib\http\client.py", line 1229, in request self._send_request(method, url, body, headers, encode_chunked) File "D:\pyton\lib\http\client.py", line 1275, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "D:\pyton\lib\http\client.py", line 1224, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "D:\pyton\lib\http\client.py", line 1016, in _send_output self.send(msg) File "D:\pyton\lib\http\client.py", line 956, in send self.connect() File "D:\pyton\lib\site-packages\urllib3\connection.py", line 181, in connect conn = self._new_conn() File "D:\pyton\lib\site-packages\urllib3\connection.py", line 168, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x04E42AF0>: Failed to establish a new connection: [WinError 10061] Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "../quickstart.py", line 29, in session.follow_user_followers(['gaziemirbel', 'menderesbel'], amount=10, randomize=False, sleep_delay=60) File "D:\pyton\lib\site-packages\instapy\instapy.py", line 3082, in follow_user_followers self.logfolder) File "D:\pyton\lib\site-packages\instapy\unfollow_util.py", line 973, in get_given_user_followers web_address_navigator(browser, user_link) File "D:\pyton\lib\site-packages\instapy\util.py", line 1022, in web_address_navigator current_url = get_current_url(browser) File "D:\pyton\lib\site-packages\instapy\util.py", line 1555, in get_current_url current_url = browser.execute_script("return window.location.href") File "D:\pyton\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 636, in execute_script 'args': converted_args})['value'] File "D:\pyton\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 319, in execute response = self.command_executor.execute(driver_command, params) File "D:\pyton\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 374, in execute return self._request(command_info[0], url, body=data) File "D:\pyton\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 397, in _request resp = self._conn.request(method, url, body=body, headers=headers) File "D:\pyton\lib\site-packages\urllib3\request.py", line 72, in request **urlopen_kw) File "D:\pyton\lib\site-packages\urllib3\request.py", line 150, in request_encode_body return self.urlopen(method, url, **extra_kw) File "D:\pyton\lib\site-packages\urllib3\poolmanager.py", line 323, in urlopen response = conn.urlopen(method, u.request_uri, **kw) File "D:\pyton\lib\site-packages\urllib3\connectionpool.py", line 667, in urlopen **response_kw) File "D:\pyton\lib\site-packages\urllib3\connectionpool.py", line 667, in urlopen **response_kw) File "D:\pyton\lib\site-packages\urllib3\connectionpool.py", line 667, in urlopen **response_kw) File "D:\pyton\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "D:\pyton\lib\site-packages\urllib3\util\retry.py", line 398, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=62482): Max retries exceeded with url: /session/0a56200386b3b3be9d30b64a1f9bdbd7/execute (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x04E42AF0>: Failed to establish a new connection: [WinError 10061] Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı')) Press any key to continue . . .

sader22 avatar Mar 05 '19 18:03 sader22

""" Quickstart script for InstaPy usage """

imports

from instapy import InstaPy from instapy import smart_run

login credentials

insta_username = '1' insta_password = '1'

get an InstaPy session!

set headless_browser=True to run InstaPy in the background

session = InstaPy(username=insta_username, password=insta_password, headless_browser=False)

with smart_run(session): """ Activity flow """

Follows the followers of each given user

The usernames can be either a list or a string

The amount is for each account, in this case 30 users will be followed

If randomize is false it will pick in a top-down fashion

default sleep_delay=600 (10min) for every 10 user following, in this case

sleep for 60 seconds

session.set_skip_users(skip_private=True, skip_no_profile_pic=True, no_profile_pic_percentage=100) session.follow_user_followers(['gaziemirbel', 'menderesbel'], amount=10, randomize=False, sleep_delay=60)

script I am using

sader22 avatar Mar 05 '19 18:03 sader22

I'm also having that issue

leonardogrig avatar Mar 06 '19 19:03 leonardogrig

+1 to having this issue.

My traceback:

________________________________________________________________________________
INFO [2019-03-07 15:24:02] [{myusername}]  Starting to follow user Followers..
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
INFO [2019-03-07 15:24:02] [{myusername}]  User '{accountToFollowFollowers}' [1/1]
Traceback (most recent call last):
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
   (self._dns_host, self.port), self.timeout, **extra_kw)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
   raise err
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
   sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
   chunked=chunked)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request
   conn.request(method, url, **httplib_request_kw)
 File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
   self._send_request(method, url, body, headers, encode_chunked)
 File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
   self.endheaders(body, encode_chunked=encode_chunked)
 File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
   self._send_output(message_body, encode_chunked=encode_chunked)
 File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
   self.send(msg)
 File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
   self.connect()
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/connection.py", line 181, in connect
   conn = self._new_conn()
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/connection.py", line 168, in _new_conn
   self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x111315e48>: Failed to establish a new connection: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "{myusername}.py", line 26, in <module>
   randomize=False, interact=False)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/instapy/instapy.py", line 3082, in follow_user_followers
   self.logfolder)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/instapy/unfollow_util.py", line 973, in get_given_user_followers
   web_address_navigator(browser, user_link)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/instapy/util.py", line 1022, in web_address_navigator
   current_url = get_current_url(browser)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/instapy/util.py", line 1555, in get_current_url
   current_url = browser.execute_script("return window.location.href")
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 636, in execute_script
   'args': converted_args})['value']
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 319, in execute
   response = self.command_executor.execute(driver_command, params)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/selenium/webdriver/remote/remote_connection.py", line 374, in execute
   return self._request(command_info[0], url, body=data)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/selenium/webdriver/remote/remote_connection.py", line 397, in _request
   resp = self._conn.request(method, url, body=body, headers=headers)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/request.py", line 72, in request
   **urlopen_kw)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/request.py", line 150, in request_encode_body
   return self.urlopen(method, url, **extra_kw)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/poolmanager.py", line 323, in urlopen
   response = conn.urlopen(method, u.request_uri, **kw)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 667, in urlopen
   **response_kw)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 667, in urlopen
   **response_kw)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 667, in urlopen
   **response_kw)
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
   _stacktrace=sys.exc_info()[2])
 File "/Users/{myusername}/Instapy/instapy-quickstart/myenv/lib/python3.6/site-packages/urllib3/util/retry.py", line 398, in increment
   raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=52971): Max retries exceeded with url: /session/e486021a18849437da3a6a69b55229c6/execute (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x111315e48>: Failed to establish a new connection: [Errno 61] Connection refused',))

I've tried investigating but I get stuck at figuring out where/why '/session/e486021a18849437da3a6a69b55229c6/execute' is called, and why it's failing. Any ideas?

phillykev avatar Mar 07 '19 20:03 phillykev

@timgrossmann

sader22 avatar Mar 10 '19 18:03 sader22

I am also having this issue

alecrimi avatar Mar 26 '19 21:03 alecrimi

why it is closed ???

sader22 avatar Mar 27 '19 22:03 sader22

i have the same issue did anyone find a solution??

benhaddoureda avatar Mar 28 '19 18:03 benhaddoureda

same issue any solutions ???

mando15 avatar Apr 02 '19 10:04 mando15

I also still have this exact issue. Any solutions that have worked people?

CharlesHAMO avatar Apr 09 '19 12:04 CharlesHAMO

still waiting for

sader22 avatar Apr 10 '19 16:04 sader22

Did anyone ever get anywhere with this? All of my sessions crash this way, when they complete, when I use "smart_run" so none of my other scheduled events run unless I start the code up again manually...

booksix avatar May 08 '19 05:05 booksix

I have the same problem and have to run everything inside a shell script that keeps restarting it.

bgunsberger avatar May 08 '19 05:05 bgunsberger

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

stale[bot] avatar Jun 07 '19 06:06 stale[bot]

+1 same issue on MacOS

Max retries exceeded with url: /session/x/execute (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x104d24650>: Failed to establish a new connection: [Errno 61] Connection refused',))

rubinho101 avatar Jun 10 '19 10:06 rubinho101

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

stale[bot] avatar Jul 10 '19 11:07 stale[bot]

+1 Same issue on MacOS Mojave

mojtabacazi avatar Aug 06 '19 18:08 mojtabacazi

+1 Same issue on MacOS Mojave

baminou avatar Aug 17 '19 23:08 baminou

+1 Same issue on MacOS Mojave

jfbelisle avatar Sep 13 '19 12:09 jfbelisle

+1 same issue

elpinkypie avatar Sep 20 '19 20:09 elpinkypie

+1 same issue

msabastian avatar Nov 27 '19 00:11 msabastian