我是python的新手,我无法分析以下错误。 有人知道为什么我的脚本崩溃了吗?

我正在抓取网络上的一些数据,每次刮刀命中时,脚本会将该时间写入数据库(以检查脚本是否仍然存在)。 脚本每隔几天崩溃一次。

提前致谢。

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 356, in connect
    ssl_context=context)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 359, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/usr/local/lib/python3.7/ssl.py", line 850, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.7/ssl.py", line 1108, in do_handshake
    self._sslobj.do_handshake()
OSError: [Errno 0] Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 445, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 367, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 356, in connect
    ssl_context=context)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 359, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/usr/local/lib/python3.7/ssl.py", line 850, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.7/ssl.py", line 1108, in do_handshake
    self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError(0, 'Error'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/firebase_admin/db.py", line 881, in request
    return super(_Client, self).request(method, url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/firebase_admin/_http_client.py", line 84, in request
    resp = self._session.request(method, self._base_url + url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/google/auth/transport/requests.py", line 201, in request
    method, url, data=data, headers=request_headers, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 495, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', OSError(0, 'Error'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./main.py", line 32, in <module>
    firebase.write_time_stamp(for_js)
  File "/firebase.py", line 38, in write_time_stamp
    'time': stamp
  File "/usr/local/lib/python3.7/site-packages/firebase_admin/db.py", line 339, in update
    self._client.request('patch', self._add_suffix(), json=value, params='print=silent')
  File "/usr/local/lib/python3.7/site-packages/firebase_admin/db.py", line 883, in request
    raise ApiCallError(_Client.extract_error_message(error), error)
firebase_admin.db.ApiCallError: ('Connection aborted.', OSError(0, 'Error'))

  ask by Tim Klupp translate from so

本文未有回复,本站智能推荐:

1回复

超时SSL握手

我正在尝试将TimeoutMixin纳入TimeoutMixin SSL的协议中。 但是,当发生超时并调用transport.loseConnection()什么也没有发生。 我认为这与TLSMemoryBIOProtocol中的以下代码有关 : 问题在于超时发生在握手发生之前。 在服
1回复

在Orchard中手动渲染ErrorPage形状

交叉路口: https ://orchard.codeplex.com/discussions/472090 我们可以通过特定的路径(例如〜/ Error / ErrorPage或类似的东西)来获取要呈现的ErrorPage形状吗? 我的网站中的“运行时错误”页面有500个错误,我想通过c
1回复

SONYLifelogApi:SSL握手失败

我尝试通过python(带有requests库)或openssl到达platform.lifelog.sonymobile.com:443时遇到SSL握手失败。 这是我从openssl得到的输出 ssl3 : tlsv1.1 : tlsv1.2 : 我是否需要客户证明书或其他
1回复

SSL握手错误:[错误1]

我正在尝试使用Python Httplib2访问此站点: 但是我得到这个错误: 这是我使用的python代码: 我已经尝试过使用其他库,但是会发生相同的错误。
1回复

SSL错误:握手不良

我不断得到SSLError: ('bad handshake SysCallError(0, None))随时我尝试在我的django应用程序中使用python请求发出请求。 可能是什么问题?
1回复

asyncio在SSL握手时挂起

我目前正在将一些遗留代码迁移到 asyncio 并遇到有关 SSL 握手的问题。 我正在创建一个 SSL 服务器:import osimport socketimport asynciofrom myexample import Connectionstorage_path = '.' # Path
9回复

python请求ssl握手失败

每次我尝试做: 我收到此消息: 我尝试了一切: 更新我的要求 更新我的SSL 但没有任何变化。 我正在使用Python 2.7.6,无法更改此设置。
2回复

ssl握手失败,使用scrapy代理

我正在尝试在一个草率的项目上设置代理。 我按照这个答案的指示进行操作: “ 1-创建一个名为“ middlewares.py”的新文件,并将其保存在您的爬网项目中,并向其中添加以下代码:” 要获取代理,我正在使用来自以下网址的免费订阅: https ://proxy.webshare.