成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

anacondaspyder出錯(cuò)怎么辦-創(chuàng)新互聯(lián)

創(chuàng)新互聯(lián)www.cdcxhl.cn八線動(dòng)態(tài)BGP香港云服務(wù)器提供商,新人活動(dòng)買多久送多久,劃算不套路!

成都創(chuàng)新互聯(lián)公司專注于松桃企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站建設(shè),商城網(wǎng)站開發(fā)。松桃網(wǎng)站建設(shè)公司,為松桃等地區(qū)提供建站服務(wù)。全流程按需網(wǎng)站設(shè)計(jì),專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,成都創(chuàng)新互聯(lián)公司專業(yè)和態(tài)度為您提供的服務(wù)

這篇文章將為大家詳細(xì)講解有關(guān)anaconda spyder出錯(cuò)怎么辦,小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。

anaconda spyder出錯(cuò)解決:

寫Python程序時(shí)突然遇到報(bào)錯(cuò):

This command failed to be executed because an error occurred while trying to get the file code from Spyder's editor. The error was:


An exception has occurred, use %tb to see the full traceback.

UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 582: illegal multibyte sequence

UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 611: illegal multibyte sequence

In [2]: %tb
Traceback (most recent call last):

  File "C:\Users\peter\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 401, in get_file_code
    return f.read()

UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 582: illegal multibyte sequence

先嘗試重啟程序,也許報(bào)錯(cuò)就解決了。

解決方法是根據(jù)報(bào)錯(cuò),修改文件C:\Users\peter\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py為:

def get_file_code(filename):
    """Retrive the content of a file."""
    # Get code from spyder
    try:
        file_code = frontend_request().get_file_code(filename)
    except (CommError, TimeoutError):
        file_code = None
    if file_code is None:
        with open(filename, 'r',encoding='utf-8') as f:#增加 ,encoding='utf-8'
            return f.read()
    return file_code

如果不重啟程序,會(huì)報(bào)錯(cuò):

[autoreload of spydercustomize failed: Traceback (most recent call last):
  File "C:\Users\peter\Anaconda3\lib\site-packages\IPython\extensions\autoreload.py", line 245, in check
    superreload(m, reload, self.old_objects)
  File "C:\Users\peter\Anaconda3\lib\site-packages\IPython\extensions\autoreload.py", line 394, in superreload
    module = reload(module)
  File "C:\Users\peter\Anaconda3\lib\imp.py", line 314, in reload
    return importlib.reload(module)
  File "C:\Users\peter\Anaconda3\lib\importlib\__init__.py", line 168, in reload
    raise ModuleNotFoundError(f"spec not found for the module {name!r}", name=name)
ModuleNotFoundError: spec not found for the module 'spydercustomize'
]
This command failed to be executed because an error occurred while trying to get the file code from Spyder's editor. The error was:


An exception has occurred, use %tb to see the full traceback.

UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 582: illegal multibyte sequence

關(guān)于anaconda spyder出錯(cuò)怎么辦就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。

網(wǎng)站標(biāo)題:anacondaspyder出錯(cuò)怎么辦-創(chuàng)新互聯(lián)
文章出自:http://jinyejixie.com/article10/jssgo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信小程序、標(biāo)簽優(yōu)化網(wǎng)站內(nèi)鏈、ChatGPT網(wǎng)頁(yè)設(shè)計(jì)公司、網(wǎng)站設(shè)計(jì)公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站建設(shè)
尼木县| 腾冲县| 宁城县| 淮南市| 开江县| 柘荣县| 海安县| 沈阳市| 临泽县| 许昌市| 河曲县| 莱芜市| 凤山市| 庆元县| 兴安县| 遵化市| 监利县| 洛隆县| 大兴区| 鄂尔多斯市| 哈巴河县| 翁源县| 深州市| 竹溪县| 安溪县| 广东省| 都兰县| 吉隆县| 常宁市| 湖北省| 义乌市| 盘锦市| 安多县| 揭西县| 宁晋县| 嵩明县| 龙岩市| 锡林浩特市| 汽车| 合作市| 乳山市|