寶塔Linux面板添加站點(diǎn)提示“TypeError: deprecated() got an unexpected keyword argument 'name'”的解決辦法

[重要通告]如您遇疑難雜癥,本站支持知識(shí)付費(fèi)業(yè)務(wù),掃右邊二維碼加博主微信,可節(jié)省您寶貴時(shí)間哦!

今天閑著蛋疼給自己以前的一個(gè)垃圾服務(wù)器裝一個(gè)寶塔Linux控制面板,這東西不說(shuō)每天給客戶裝吧,好歹也經(jīng)常裝,今天給自己裝完是正常,再安裝“網(wǎng)站監(jiān)控報(bào)表”的時(shí)候就特么的出錯(cuò)了,錯(cuò)誤還挺奇葩,以前沒(méi)注意過(guò)這個(gè)錯(cuò)誤頭部顯示“TypeError: deprecated() got an unexpected keyword argument 'name'”下面是大致的錯(cuò)誤 如下文字與圖所示

Traceback (most recent call last):
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/www/server/panel/BTPanel/__init__.py", line 400, in site
import panelSite
File "class/panelSite.py", line 15, in
import OpenSSL
File "/www/server/panel/pyenv/lib/python3.7/site-packages/OpenSSL/__init__.py", line 8, in
from OpenSSL import SSL, crypto
File "/www/server/panel/pyenv/lib/python3.7/site-packages/OpenSSL/SSL.py", line 34, in
from OpenSSL.crypto import (
File "/www/server/panel/pyenv/lib/python3.7/site-packages/OpenSSL/crypto.py", line 953, in
name="X509Extension",
TypeError: deprecated() got an unexpected keyword argument 'name'

寶塔Linux面板添加站點(diǎn)提示“TypeError: deprecated() got an unexpected keyword argument 'name'”的解決辦法

看到““TypeError: deprecated() got an unexpected keyword argument 'name'”其實(shí)是懵逼的,查詢了好多資料都沒(méi)有能成功,都快崩潰了,然而出去喝了會(huì)兒酒,喲呵~~好像發(fā)現(xiàn)了新大陸;

其實(shí)我一直看的錯(cuò)誤是“TypeError: deprecated() got an unexpected keyword argument 'name'”,一直盯著,其實(shí)也看到有人說(shuō)cryptography、pyOpenSSL版本太舊造成的,但我還是把錯(cuò)誤都復(fù)制到記事本查看,也沒(méi)看出啥癥狀,有人說(shuō)可能是“paramiko插件”問(wèn)題,死馬當(dāng)活馬醫(yī);連接SSH開(kāi)始測(cè)試;

一、既然錯(cuò)誤,那就卸載paramiko插件從新安裝paramiko插件;

cd /www/server/panel/pyenv/bin? ? ?#進(jìn)入paramiko插件目錄

./pip uninstall paramiko? ? #? 卸載paramiko插件   會(huì)問(wèn)是否卸載 Proceed (y/n)? y 小寫(xiě)

./pip install paramiko? #? 安裝 paramiko插件

二、安裝完之后,貌似有告知,注意,這不是錯(cuò)誤,是告知你東西可以用,但建議你升級(jí)!

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
aliyun-python-sdk-core 2.13.30 requires cryptography<3.3,>=2.9.2, but you have cryptography 42.0.7 which is incompatible.
Successfully installed cryptography-42.0.7 paramiko-3.4.0 pynacl-1.5.0
WARNING: You are using pip version 20.3.3; however, version 24.0 is available.
You should consider upgrading via the '/www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip' command.

三、既然建議升級(jí),那就聽(tīng)取建議,升級(jí)一下;聽(tīng)人勸吃飽飯!輸入如下代碼,直接回車即可:

/www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip

四、提示升級(jí)完成

寫(xiě)在最后,其實(shí)不知道咋回事兒,它也竟然真的好了,一開(kāi)始還想著琢磨flask或OpenSSL,甚至大小寫(xiě)的問(wèn)題,最終還是看了一篇文章感覺(jué)有點(diǎn)兒意思,就聽(tīng)了勸,總算搞定了!

問(wèn)題未解決?付費(fèi)解決問(wèn)題加Q或微信 2589053300 (即Q號(hào)又微信號(hào))右上方掃一掃可加博主微信

所寫(xiě)所說(shuō),是心之所感,思之所悟,行之所得;文當(dāng)無(wú)敷衍,落筆求簡(jiǎn)潔。 以所舍,求所獲;有所依,方所成!

支付寶贊助
微信贊助

免責(zé)聲明,若由于商用引起版權(quán)糾紛,一切責(zé)任均由使用者承擔(dān)。

您必須遵守我們的協(xié)議,如您下載該資源,行為將被視為對(duì)《免責(zé)聲明》全部?jī)?nèi)容的認(rèn)可->聯(lián)系老梁投訴資源
LaoLiang.Net部分資源來(lái)自互聯(lián)網(wǎng)收集,僅供用于學(xué)習(xí)和交流,請(qǐng)勿用于商業(yè)用途。如有侵權(quán)、不妥之處,請(qǐng)聯(lián)系站長(zhǎng)并出示版權(quán)證明以便刪除。 敬請(qǐng)諒解! 侵權(quán)刪帖/違法舉報(bào)/投稿等事物聯(lián)系郵箱:service@laoliang.net
意在交流學(xué)習(xí),歡迎贊賞評(píng)論,如有謬誤,請(qǐng)聯(lián)系指正;轉(zhuǎn)載請(qǐng)注明出處: » 寶塔Linux面板添加站點(diǎn)提示“TypeError: deprecated() got an unexpected keyword argument 'name'”的解決辦法

發(fā)表回復(fù)

本站承接,網(wǎng)站推廣(SEM,SEO);軟件安裝與調(diào)試;服務(wù)器或網(wǎng)絡(luò)推薦及配置;APP開(kāi)發(fā)與維護(hù);網(wǎng)站開(kāi)發(fā)修改及維護(hù); 各財(cái)務(wù)軟件安裝調(diào)試及注冊(cè)服務(wù)(金蝶,用友,管家婆,速達(dá),星宇等);同時(shí)也有客戶管理系統(tǒng),人力資源,超市POS,醫(yī)藥管理等;

立即查看 了解詳情