原文:Pycharm:設置完Anaconda后報錯TypeError: an integer is required (got type bytes)

背景:安裝了最新版本的Anaconda . 后,在Pycharm中設置Python Interpreter為這個最新版本Anaconda文件下的python.exe后,控制台無法啟動並報錯TypeError: an integer is required got type bytes 原因:電腦上的Anaconda的版本必須比Python小一位。比如Python版本為 . ,那Anaconda的版 ...

2020-10-15 20:46 0 3663 推薦指數:

查看詳情

python報錯 TypeError: an integer is required

問題描述: 在本地使用socket向NetAssist傳送數據的時候,執行python文件發現報出python 報錯TypeError: an integer is required錯誤 代碼: 執行結果: 產生原因: 通過查詢python文檔,發現是傳遞 ...

Thu Dec 07 22:34:00 CST 2017 0 34331
TypeError: a bytes-like object is required, not 'str'

問題分析 該問題主要是由於當前操作的字符串是bytes類型的字符串對象,並對該bytes類型的字符串對象進行按照str類型的操作。 如下面圖所示,s 為bytes類型字符串對象。 當對s進行按照str類型的操作(split)時,會彈出一下錯誤提示。因為split函數 ...

Tue Dec 12 23:40:00 CST 2017 0 38368
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM