国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

【python】報錯ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1122)

這篇具有很好參考價值的文章主要介紹了【python】報錯ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1122)。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

使用requests時,報錯ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1122)

完整報錯信息如下:

Traceback (most recent call last):
  File "D:\Academic\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 700, in urlopen
    self._prepare_proxy(conn)
  File "D:\Academic\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 996, in _prepare_proxy
    conn.connect()
  File "D:\Academic\Python\Python39\lib\site-packages\urllib3\connection.py", line 364, in connect
    self.sock = conn = self._connect_tls_proxy(hostname, conn)
  File "D:\Academic\Python\Python39\lib\site-packages\urllib3\connection.py", line 499, in _connect_tls_proxy
    socket = ssl_wrap_socket(
  File "D:\Academic\Python\Python39\lib\site-packages\urllib3\util\ssl_.py", line 453, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "D:\Academic\Python\Python39\lib\site-packages\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "D:\Academic\Python\Python39\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Academic\Python\Python39\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\Academic\Python\Python39\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1122)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Academic\Python\Python39\lib\site-packages\requests\adapters.py", line 489, in send
    resp = conn.urlopen(
  File "D:\Academic\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "D:\Academic\Python\Python39\lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='tsms-drcn.security.dbankcloud.cn', port=443): Max retries exceeded with url: /tsms/v2/attest (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1122)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\AcademicWorkplace\DeviceIntegrity\SafetyDetect\HMSAna\web-curl-py.py", line 17, in <module>
    response = requests.post('https://tsms-drcn.security.dbankcloud.cn/tsms/v2/attest', headers=headers, json=json_data)
  File "D:\Academic\Python\Python39\lib\site-packages\requests\api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "D:\Academic\Python\Python39\lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "D:\Academic\Python\Python39\lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "D:\Academic\Python\Python39\lib\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "D:\Academic\Python\Python39\lib\site-packages\requests\adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='tsms-drcn.security.dbankcloud.cn', port=443): Max retries exceeded with url: /tsms/v2/attest (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1122)')))

解決方法:關(guān)閉系統(tǒng)網(wǎng)絡(luò)代理軟件(關(guān)閉System Proxy)文章來源地址http://www.zghlxwxcb.cn/news/detail-508246.html

到了這里,關(guān)于【python】報錯ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1122)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • python安裝第三方包異常【SSLEOFError】、[SSL: CERTIFICATE_VERIFY_FAILED]

    python安裝第三方包異?!維SLEOFError】、[SSL: CERTIFICATE_VERIFY_FAILED]

    Could not fetch URL https://pypi.org/simple/ xxxx /: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=\\\'pypi.org\\\', port=443): Max retries exceeded with url: /simple/ xxxx l/ (Caused by SSLError(SSLEOFError(8, \\\'EOF occurred in violation of protocol (_ssl.c:852)\\\'),)) - skipping ERROR: Could not find a version that satisfies the requi

    2024年02月11日
    瀏覽(28)
  • 【python】linux系統(tǒng)python報錯“ssl module in Python is not available”

    【python】linux系統(tǒng)python報錯“ssl module in Python is not available”

    pip安裝時遇到openssl問題,沒辦法安裝第三方庫 “WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.?” 直接執(zhí)行python,進入python, 輸入import? ssl ,也會報相似的錯誤。? 正常情況下,是這樣的,導(dǎo)入成功無報錯 根據(jù)出錯信息提示分析:

    2024年02月21日
    瀏覽(17)
  • 【Eclipse】Error occurred during initialization of boot layer.報錯解決方法

    【Eclipse】Error occurred during initialization of boot layer.報錯解決方法

    個人記錄日志: 根本原因:Java9相較于Java8(JDK8、JDK1.8)引進了模塊,此時無法進行單獨的類。 (在Java8和更早的應(yīng)用程序中,頂級組件是包? package ?。它將一組相關(guān)類型放入一個組中。它還包含一組資源。 java9應(yīng)用程序與java8沒有太大區(qū)別;它引入了一個新組件? module ?,

    2024年02月01日
    瀏覽(19)
  • Python報錯:IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in

    Python報錯如下: 這是一個Python程序的運行錯誤信息,提示了以下問題: NO.1 UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_. :這是一個警告提示,提醒你在使用 nn.init.xavier_uniform 時應(yīng)改為使用 nn.init.xavier_uniform_ 。 NO.2 Traceback (most recent call last):... :這部

    2024年02月14日
    瀏覽(25)
  • VMware Workstation 不可恢復(fù)錯誤: (vcpu-1) Exception 0xc0000005 (access violation) has occurred終極解決方案

    VMware Workstation 不可恢復(fù)錯誤: (vcpu-1) Exception 0xc0000005 (access violation) has occurred終極解決方案

    VMware Workstation 不可恢復(fù)錯誤: (vcpu-0) Exception 0xc0000005 (access violation) has occurred. 嘗試了網(wǎng)上一切能找到的方法,都無法解決,實際上還是問題根源沒找到。 你們可以先用前面幾種解決方案試試,如果能夠解決就好,說明你的問題就是其中一種。 但是最苦惱的是不知道什么原因

    2024年02月03日
    瀏覽(19)
  • 啟動nginx報錯:invalid number of arguments in “root“ directive in,是文件路徑書寫問題

    啟動nginx報錯:invalid number of arguments in “root“ directive in,是文件路徑書寫問題

    無法啟動nginx,錯誤日志提示如下: 原因: 這個一個比較常見的問題,配置文件里面應(yīng)該有路徑有問題 注意在:這里如果路徑名稱有空格要用引號引起來,否則會被當成2個路徑解析。 如上,提示nginx.conf文件的208行, 改成這樣就沒事了:

    2024年02月09日
    瀏覽(24)
  • nginx配置SSL數(shù)字證書、報錯nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in

    nginx配置SSL數(shù)字證書、報錯nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in

    nginx一般默認安裝目錄是 /usr/local/nginx,請按自己實際安裝目錄操作 名稱 命令 查看版本 /usr/local/nginx/sbin/nginx -v 啟動服務(wù) /usr/local/nginx/sbin/nginx 重啟服務(wù) /usr/local/nginx/sbin/nginx-s restart 停止服務(wù) /usr/local/nginx/sbin/nginx -s stop 是否啟動 ps -ef | grep nginx 強制結(jié)束 kill 進程ID (如:kil

    2024年02月15日
    瀏覽(29)
  • 生成器報錯,RuntimeError: Sizes of tensors must match except in dimension

    RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 2 but got size 3 for tensor number 1 in the list. 常見的模型報錯,比方說pix2pix模型 In[18], line 84, in Generator.forward(self, x) ????????82 bottleneck = self.bottleneck(d7) ????????83 up1 = self.up1(bottleneck) --- 84 up2 = self.up2(torch.cat([up1, d

    2024年02月09日
    瀏覽(24)
  • 解決啟動報錯Consider defining a bean of type ‘xxx‘ in your configuration.

    解決啟動報錯Consider defining a bean of type ‘xxx‘ in your configuration.

    報錯截圖 解決方法:查看注解是否同時存在@AllArgsConstructor/@RequiredArgsConstructor和@Value,如果同時存在,去掉構(gòu)造函數(shù)注解。給bean加上@Autowired,,給非static修飾的常量去掉final修飾。 如:

    2024年02月06日
    瀏覽(21)
  • 解決網(wǎng)絡(luò)編程中的EOF違反協(xié)議問題:requests庫與SSL錯誤案例分析

    解決網(wǎng)絡(luò)編程中的EOF違反協(xié)議問題:requests庫與SSL錯誤案例分析

    1. 問題背景 近期,一個用戶在使用requests庫進行網(wǎng)絡(luò)編程時遭遇到了一個不尋常的問題,涉及SSL錯誤,并提示錯誤消息為 SSLError(SSLEOFError(8, u\\\'EOF occurred in violation of protocol (_ssl.c:661)\\\'),)) 。該用戶表示已經(jīng)采取了多種方法來解決這個問題,包括更換設(shè)備、更新操作系統(tǒng)和庫等措

    2024年02月20日
    瀏覽(17)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包