Debugger PIN: 139-641-843
127.0.0.1 - - [15/Jul/2024 15:28:34] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/util/connection.py", line 73, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib64/python3.12/socket.py", line 964, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f17333a34a0>: Failed to establish a new connection: [Errno -5] No address associated with hostname
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.quotable.io', port=443): Max retries exceeded with url: /random (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f17333a34a0>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 2088, in call
return self.wsgi_app(environ, start_response)
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.handle_exception(e)
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, *kwargs)))
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(args, kwargs)))
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args)
File "/home/abhi/opensource/ytspider/app.py", line 196, in hello_world
page_response = make_response(render_template('home.html', trend=trending_page, ran_quote=ran_quote(), last_details=[last_access, last_s]))
File "/home/abhi/opensource/ytspider/stuff.py", line 23, in ran_quote
quotes_page = json.loads(requests.get("https://api.quotable.io/random").content)
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, kwargs)
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, kwargs)
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, send_kwargs)
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, kwargs)
File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.quotable.io', port=443): Max retries exceeded with url: /random (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f17333a34a0>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))
Thanks for the bug report!
That seems to be an issue with the quotable API that is being called in the beginning
It seems that the API endpoint has stopped working.
I'll try and get a fixed push :)
error at "/" route broken "ran_quote()" function in stuff.py
no data being served by https://api.quotable.io/random quotes_page = json.loads(requests.get("https://api.quotable.io/random").content)
(env) abhi@fedora:~/opensource/ytspider$ python app.py
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn conn.connect() File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connection.py", line 353, in connect conn = self._new_conn() File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connection.py", line 181, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f17333a34a0>: Failed to establish a new connection: [Errno -5] No address associated with hostname
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.quotable.io', port=443): Max retries exceeded with url: /random (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f17333a34a0>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 2088, in call return self.wsgi_app(environ, start_response) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 2073, in wsgi_app response = self.handle_exception(e) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask_cors/extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(*args, *kwargs))) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 2070, in wsgi_app response = self.full_dispatch_request() File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 1515, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask_cors/extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(args, kwargs))) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 1513, in full_dispatch_request rv = self.dispatch_request() File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/flask/app.py", line 1499, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/home/abhi/opensource/ytspider/app.py", line 196, in hello_world page_response = make_response(render_template('home.html', trend=trending_page, ran_quote=ran_quote(), last_details=[last_access, last_s])) File "/home/abhi/opensource/ytspider/stuff.py", line 23, in ran_quote quotes_page = json.loads(requests.get("https://api.quotable.io/random").content) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, kwargs) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, kwargs) File "/home/abhi/opensource/ytspider/env/lib/python3.12/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.quotable.io', port=443): Max retries exceeded with url: /random (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f17333a34a0>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))