问题描述
我编写了一个脚本,使用 wfdb python库。当我在 windows 上运行脚本时,该脚本运行良好,但最近我改用了 Mac 。安装所有依赖项后,尝试从 wfdb 库导入 处理 时出现错误。这是我得到的错误:
I wrote a script to extract signals from the MIT-BIH dataset using the wfdb python library. The script was working fine when I was running it on windows but I recently shifted to Mac. After installing all the dependencies I got an error when I tried to import processing from the wfdb library. This is the error I get:
导入wfdb可以正常工作,但是当我从wfdb导入处理中执行时似乎出现了问题
。有什么办法解决这个问题?
import wfdb works fine but there seems to be a problem when I do from wfdb import processing
. Is there any way to solve this issue?
推荐答案
请在代码顶部添加以下行。
Please add following line at the top of the code.
# -*- coding: utf-8 -*-
此外,请避免使用非ascii引号。
Also, avoid using non-ascii quotations.
这篇关于文件中非ASCII字符'\xe2',但未声明编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!