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

已解決TypeError: Descriptors cannot not be created directly.

這篇具有很好參考價(jià)值的文章主要介紹了已解決TypeError: Descriptors cannot not be created directly.。希望對大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

已解決TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.1.0If you cannot immediately regenerate your protos, some other possible workarounds are:

1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUPFERS_PYTHON_iMPLEMENTATION=python (but this will use pure-Python parsing and will be mch slower ,More information: https://developers. google.com/protocol-buffers/docs/news/2022-05-06#python-updates
(paddle) F: \pycharm\PyCharm Community Edition 2022.1.4\bin\PaddleOCR-release-2.6\PPOCRLabe1>-









報(bào)錯(cuò)代碼



粉絲群一個(gè)小伙伴想要安裝一個(gè)PPOCRLabel,pip里已經(jīng)把paddlepaddle和paddleorc下好了,然后輸入PPOCRLabel --lang ch
,但是還是發(fā)生了報(bào)錯(cuò)(當(dāng)時(shí)他心里瞬間涼了一大截,跑來找我求助,然后順利幫助他解決了,順便記錄一下希望可以幫助到更多遇到這個(gè)bug不會(huì)解決的小伙伴),報(bào)錯(cuò)代碼如下:


已解決TypeError: Descriptors cannot not be created directly.


報(bào)錯(cuò)信息內(nèi)容如下

TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.1.0If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUPFERS_PYTHON_iMPLEMENTATION=python (but this will use pure-Python parsing and will be mch slower ,More information: https://developers. google.com/protocol-buffers/docs/news/2022-05-06#python-updates
(paddle) F: \pycharm\PyCharm Community Edition 2022.1.4\bin\PaddleOCR-release-2.6\PPOCRLabe1>-



報(bào)錯(cuò)翻譯



報(bào)錯(cuò)信息翻譯如下

類型錯(cuò)誤:無法直接創(chuàng)建描述符。
如果此調(diào)用來自_pb2.py文件,則生成的代碼已過期,必須使用protoc>=3.1.0重新生成。如果無法立即重新生成protos,則其他一些可能的解決方法如下:

  • 將protobuf包降級至3.20.x或更低。
  • 設(shè)置PROTOCOL_BUPFERS_PYTHON_iMPLEMENTATION=PYTHON(但這將使用純PYTHON解析,速度會(huì)慢很多,更多信息:https://developers.google.com/protocolbuffers/docs/news/2022-05-06#python更新(槳板)F:\pycharm\pycharm社區(qū)版2022.1.4\bin\PidleOCR-release-2.6\PPOCRabe1>



報(bào)錯(cuò)原因



報(bào)錯(cuò)原因

仔細(xì)閱讀報(bào)錯(cuò)信息就會(huì)發(fā)現(xiàn),報(bào)錯(cuò)的主要原因是因?yàn)閜rotobuf的版本太高而導(dǎo)致編譯錯(cuò)誤,所以我們只需要按照編譯器提示的信息下載3.19.0對應(yīng)的版本即可解決問題。小伙伴按下面的代碼安裝指定版本即可?。?!



解決方法



執(zhí)行下面的pip安裝命令即可:

pip install protobuf==3.19.0

或者:

pip install 'protobuf~=3.19.0'

以上是此問題報(bào)錯(cuò)原因的解決方法,歡迎評論區(qū)留言討論是否能解決,如果有用歡迎點(diǎn)贊收藏文章謝謝支持,博主才有動(dòng)力持續(xù)記錄遇到的問題!?。?/strong>

千人全棧VIP答疑群聯(lián)系博主幫忙解決報(bào)錯(cuò)

由于博主時(shí)間精力有限,每天私信人數(shù)太多,沒辦法每個(gè)粉絲都及時(shí)回復(fù),所以優(yōu)先回復(fù)VIP粉絲,可以通過訂閱限時(shí)9.9付費(fèi)專欄《100天精通Python從入門到就業(yè)》進(jìn)入千人全棧VIP答疑群,獲得優(yōu)先解答機(jī)會(huì)(代碼指導(dǎo)、遠(yuǎn)程服務(wù)),白嫖80G學(xué)習(xí)資料大禮包,專欄訂閱地址:https://blog.csdn.net/yuan2019035055/category_11466020.html

  • 優(yōu)點(diǎn)作者優(yōu)先解答機(jī)會(huì)(代碼指導(dǎo)、遠(yuǎn)程服務(wù)),群里大佬眾多可以抱團(tuán)取暖(大廠內(nèi)推機(jī)會(huì)),此專欄文章是專門針對零基礎(chǔ)和需要進(jìn)階提升的同學(xué)所準(zhǔn)備的一套完整教學(xué),從0到100的不斷進(jìn)階深入,后續(xù)還有實(shí)戰(zhàn)項(xiàng)目,輕松應(yīng)對面試!

  • 專欄福利簡歷指導(dǎo)、招聘內(nèi)推、每周送實(shí)體書、80G全棧學(xué)習(xí)視頻、300本IT電子書:Python、Java、前端、大數(shù)據(jù)、數(shù)據(jù)庫、算法、爬蟲、數(shù)據(jù)分析、機(jī)器學(xué)習(xí)、面試題庫等等

  • 注意:如果希望得到及時(shí)回復(fù),訂閱專欄后私信博主進(jìn)千人VIP答疑群已解決TypeError: Descriptors cannot not be created directly.
    已解決TypeError: Descriptors cannot not be created directly.

免費(fèi)資料獲取,更多粉絲福利,關(guān)注下方公眾號獲取

已解決TypeError: Descriptors cannot not be created directly.文章來源地址http://www.zghlxwxcb.cn/news/detail-400041.html

到了這里,關(guān)于已解決TypeError: Descriptors cannot not be created directly.的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

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

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

相關(guān)文章

  • Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

    Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

    當(dāng)我們運(yùn)行代碼要運(yùn)用到cv2庫時(shí),提示我們沒有安裝cv2,而直接用pip install opencv-python下載卻顯示下載失?。?Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly 直接運(yùn)用conda安裝: 隨后完成cv2的安裝。

    2024年02月10日
    瀏覽(37)
  • ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

    ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

    pip install --upgrade -r requirements.txt -i https://mirror.baidu.com/pypi/simple Looking in indexes: https://mirror.baidu.com/pypi/simple Collecting prettytable Downloading https://mirror.baidu.com/pypi/packages/5f/ab/64371af206988d7b15c8112c9c277b8eb4618397c01471e52b902a17f59c/prettytable-3.3.0-py3-none-any.whl (26 kB) Collecting ujson Downloading https://

    2024年01月22日
    瀏覽(25)
  • Could not build wheels for opencv-python-headless which use PEP 517 and cannot be installed directly

    筆者是python環(huán)境下安裝 albumentations 出現(xiàn)的,該庫經(jīng)常用于圖像增強(qiáng),在cv領(lǐng)域有很大的知名度。在使用下邊的命令進(jìn)行安裝后 就報(bào)了 ERROR:Could not build wheels for opencv-python-headless which use PEP 517 and cannot be installed directly 。 albumentations庫依賴opencv,在直接使用pip命令安裝時(shí),albumen

    2024年02月15日
    瀏覽(22)
  • git fatal: ‘xxx‘ is not a commit and a branch ‘xxx‘ ‘ cannot be created from it

    當(dāng)拉取一個(gè)git遠(yuǎn)程倉庫分支時(shí)報(bào)錯(cuò): 命令:git checkout -b 本地分支名 遠(yuǎn)程分支名 報(bào)錯(cuò):fatal: \\\'origin/dev_v2.8.4_v10.74.1\\\' is not a commit and a branch \\\'dev_v2.8.4_v10.74.1\\\' cannot be created from it 遠(yuǎn)程新建的分支沒有更新到本地。實(shí)際上,git倉庫分為本地倉庫和遠(yuǎn)程倉庫,我們用 checkout 命令是從本

    2024年02月10日
    瀏覽(21)
  • 【Git報(bào)錯(cuò)】fatal: ‘origin/XXX‘ is not a commit and a branch ‘XXX‘ cannot be created from it

    【Git報(bào)錯(cuò)】fatal: ‘origin/XXX‘ is not a commit and a branch ‘XXX‘ cannot be created from it

    發(fā)現(xiàn)問題 遠(yuǎn)程已有分支,本地需要新建對應(yīng)分支,于是執(zhí)行命令: git checkout --track origin/XXX 時(shí)報(bào)錯(cuò)。 原因: 遠(yuǎn)程真的沒有這個(gè)分支,所以失敗 這個(gè)情況沒什么好說的 遠(yuǎn)程有這個(gè)分支,但是本地認(rèn)為遠(yuǎn)程沒有這個(gè)分支 執(zhí)行如下命令,查看本地緩存的所有遠(yuǎn)程分支,看看你要

    2024年02月16日
    瀏覽(22)
  • 【已解決】moviepy視頻剪輯TypeError: must be real number, not NoneType問題

    MMAction2中:基于人體姿態(tài)預(yù)測動(dòng)作標(biāo)簽 之后顯示以下消息后,表明正在構(gòu)建和編寫視頻: 但出現(xiàn)以下錯(cuò)誤提示: 通過參考網(wǎng)友建議: python - 每當(dāng)嘗試將 write_videofile 運(yùn)行到 moviepy 中的剪輯時(shí),都會(huì)出現(xiàn) \\\"TypeError: must be real number, not NoneType\\\" - IT工具網(wǎng) (coder.work) 最佳方式是升級

    2024年02月10日
    瀏覽(27)
  • git拉取遠(yuǎn)程分支到本地報(bào)錯(cuò)fatal: ‘origin/XXX‘ is not a commit and a branch ‘XXX‘ cannot be created from it

    git拉取遠(yuǎn)程分支到本地報(bào)錯(cuò)fatal: ‘origin/XXX‘ is not a commit and a branch ‘XXX‘ cannot be created from it

    遠(yuǎn)程已有分支,本地需要新建對應(yīng)分支,報(bào)下面錯(cuò)誤 原因: 遠(yuǎn)程真的沒有這個(gè)分支,所以失敗 遠(yuǎn)程有這個(gè)分支,但是本地認(rèn)為遠(yuǎn)程沒有這個(gè)分支 執(zhí)行 git branch -r 命令,查看本地緩存的所有遠(yuǎn)程分支 輸出顯示遠(yuǎn)程并沒有要拉取的分支,但是實(shí)際上遠(yuǎn)程倉庫是有該分支的,從

    2024年02月15日
    瀏覽(27)
  • 【Python】成功解決TypeError: list indices must be integers or slices, not float

    【Python】成功解決TypeError: list indices must be integers or slices, not float

    【Python】成功解決TypeError: list indices must be integers or slices, not float ?? 個(gè)人主頁:高斯小哥 ?? 高質(zhì)量專欄:Matplotlib之旅:零基礎(chǔ)精通數(shù)據(jù)可視化、Python基礎(chǔ)【高質(zhì)量合集】、PyTorch零基礎(chǔ)入門教程?? 希望得到您的訂閱和支持~ ?? 創(chuàng)作高質(zhì)量博文(平均質(zhì)量分92+),分享更多關(guān)

    2024年04月27日
    瀏覽(29)
  • 【已解決】Flask項(xiàng)目報(bào)錯(cuò)TypeError: tuple indices must be integers or slices, not str

    【已解決】Flask項(xiàng)目報(bào)錯(cuò)TypeError: tuple indices must be integers or slices, not str

    本解決方案適用情境 :在 本地可以正常運(yùn)行 的flask項(xiàng)目, 放到云服務(wù)器報(bào)錯(cuò) TypeError: tuple indices must be integers or slices, not str,即代碼本身無誤的前提,可能因?yàn)榄h(huán)境差異導(dǎo)致的問題。 報(bào)錯(cuò)代碼 TypeError: tuple indices must be integers or slices, not str 這個(gè)錯(cuò)誤的意思是元組索引必須是整

    2024年02月17日
    瀏覽(29)
  • 【前端】報(bào)錯(cuò)TypeError: Cannot create property ‘xxx‘ on string ‘xxx‘

    報(bào)錯(cuò)原因分析:賦值的類型錯(cuò)誤 前端在遍歷時(shí)通過判斷條件為數(shù)據(jù)添加屬性時(shí)報(bào)錯(cuò),在重新查看代碼時(shí)發(fā)現(xiàn)為遍歷語句錯(cuò)誤。 for (let item in list) {} for (let item of list) {} 二者的不同之處在于,前者在遍歷數(shù)組時(shí)若數(shù)組下存在屬性,則會(huì)對屬性也進(jìn)行遍歷操作,故報(bào)賦值的類型錯(cuò)

    2024年02月09日
    瀏覽(13)

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

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

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

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包