Skip to content

打开文件编码问题 #1

Description

@bkfish

直接git clone 到本地运行有报错

UnicodeDecodeError: 'gbk' codec can't decode byte 0xb5 in position 2: illegal multibyte sequence

可以在prepare_data.py文件中第27行改为

    with open(resource_path(os.path.join('resources', 'name.txt')), 'r', encoding='UTF-8') as f:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions