techtanic / Discounted-Udemy-Course-Enroller

A script/software for automatically enrolling/joining 100% discounted Udemy courses for free. Get Paid Udemy courses for free with just a few clicks.
https://duce.techtanic.space
MIT License
808 stars 233 forks source link

Max Connection Retry Error #56

Closed slashdotblake closed 3 years ago

slashdotblake commented 3 years ago

Describe the bug Traceback (most recent call last): File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\urllib3\connection.py", line 169, in _new_conn conn = connection.create_connection( File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\urllib3\util\connection.py", line 96, in create_connection raise err File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\urllib3\util\connection.py", line 86, in create_connection sock.connect(sa) ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn conn.connect() File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\urllib3\connection.py", line 353, in connect conn = self._new_conn() File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\urllib3\connection.py", line 181, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x00000186DCBB8100>: Failed to establish a new connection: [WinError 10053] An established connection was aborted by the software in your host machine

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\requests\adapters.py", line 439, in send resp = conn.urlopen( File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen retries = retries.increment( File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\urllib3\util\retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.udemy.com', port=443): Max retries exceeded with url: /course/facebook-instagram-messenger-ads-course/?couponCode=ULTIMATEGOODNESS (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000186DCBB8100>: Failed to establish a new connection: [WinError 10053] An established connection was aborted by the software in your host machine'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "udemy.py", line 653, in main1 auto(links_ls) File "udemy.py", line 486, in auto course_id = get_course_id(link) File "udemy.py", line 304, in get_course_id r = requests.get(url, allow_redirects=False) File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\requests\api.py", line 76, in get return request('get', url, params=params, kwargs) File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\requests\sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\requests\sessions.py", line 655, in send r = adapter.send(request, kwargs) File "D:\pythonprojects\Discounted-Udemy-Course-Enroller-master\venv\lib\site-packages\requests\adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.udemy.com', port=443): Max retries exceeded with url: /course/facebook-instagram-messenger-ads-course/?couponCode=ULTIMATEGOODNESS (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000186DCBB8100>: Failed to establish a new connection: [WinError 10053] An established connection was aborted by the software in your host machine'))

Screenshots https://share.getcloudapp.com/6qu8Ag0w

System Info:

techtanic commented 3 years ago

Try without venv

slashdotblake commented 3 years ago

These are the libraries installed:

beautifulsoup4==4.9.3 browser-cookie3==0.12.1 bs4==0.0.1 certifi==2020.12.5 cffi==1.14.5 chardet==4.0.0 cryptography==3.4.7 html5lib==1.1 idna==2.10 importlib-metadata==4.0.1 jeepney==0.6.0 keyring==23.0.1 lz4==3.1.3 pbkdf2==1.3 pyaes==1.6.1 pycparser==2.20 pycryptodome==3.10.1 PySimpleGUI==4.39.1 pywin32-ctypes==0.2.0 requests==2.25.1 SecretStorage==3.3.1 six==1.15.0 soupsieve==2.2.1 urllib3==1.26.4 webencodings==0.5.1 zipp==3.4.1

I ran it again today and it completed without errors. We need to create an option in the GUI for it to run daily, weekly or monthly then have it create a Bash or Powershell file using Cron.

techtanic commented 3 years ago

it will be a load on the cpu if the gui can auto-start every xx days/hours. So will add some thing related in the CLI version after my exams