Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket, urllib timing out, FakeUserAgentError - on unedited app image #51

Open
danielrshackleton opened this issue May 20, 2021 · 0 comments

Comments

@danielrshackleton
Copy link

App no longer working - I even created a new function directly from the repository and it came up with:

START RequestId: 8129cacb-886e-4ee7-b95a-2a577d13b9a8 Version: $LATEST
[WARNING]	2021-05-20T00:10:20.591Z	8129cacb-886e-4ee7-b95a-2a577d13b9a8	Error occurred during loading data. Trying to use cache server http://d2g6u4gh6d9rq0.cloudfront.net/browsers/fake_useragent_0.1.10.json
Traceback (most recent call last):
  File "/var/lang/lib/python3.6/urllib/request.py", line 1349, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/var/lang/lib/python3.6/http/client.py", line 1287, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/var/lang/lib/python3.6/http/client.py", line 1333, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/var/lang/lib/python3.6/http/client.py", line 1282, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/var/lang/lib/python3.6/http/client.py", line 1042, in _send_output
    self.send(msg)
  File "/var/lang/lib/python3.6/http/client.py", line 980, in send
    self.connect()
  File "/var/lang/lib/python3.6/http/client.py", line 952, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/var/lang/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/var/lang/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/task/fake_useragent/utils.py", line 67, in get
    context=context,
  File "/var/lang/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/var/lang/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/var/lang/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/var/lang/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/var/lang/lib/python3.6/urllib/request.py", line 1377, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/var/lang/lib/python3.6/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error timed out>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/task/fake_useragent/utils.py", line 166, in load
    verify_ssl=verify_ssl,
  File "/var/task/fake_useragent/utils.py", line 122, in get_browser_versions
    verify_ssl=verify_ssl,
  File "/var/task/fake_useragent/utils.py", line 84, in get
    raise FakeUserAgentError('Maximum amount of retries reached')
fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reachedMaximum amount of retries reached: FakeUserAgentError
Traceback (most recent call last):
  File "/var/task/index.py", line 19, in handler
    chrome_options.add_argument('user-agent='+UserAgent().random)
  File "/var/task/fake_useragent/fake.py", line 69, in __init__
    self.load()
  File "/var/task/fake_useragent/fake.py", line 78, in load
    verify_ssl=self.verify_ssl,
  File "/var/task/fake_useragent/utils.py", line 250, in load_cached
    update(path, use_cache_server=use_cache_server, verify_ssl=verify_ssl)
  File "/var/task/fake_useragent/utils.py", line 245, in update
    write(path, load(use_cache_server=use_cache_server, verify_ssl=verify_ssl))
  File "/var/task/fake_useragent/utils.py", line 189, in load
    verify_ssl=verify_ssl,
  File "/var/task/fake_useragent/utils.py", line 84, in get
    raise FakeUserAgentError('Maximum amount of retries reached')
fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached

END RequestId: 8129cacb-886e-4ee7-b95a-2a577d13b9a8
REPORT RequestId: 8129cacb-886e-4ee7-b95a-2a577d13b9a8	Duration: 10559.55 ms	Billed Duration: 10560 ms	Memory Size: 1024 MB	Max Memory Used: 51 MB	Init Duration: 102.55 ms	

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant