Skip to content

text encoding problem. #27

@zhuangjun1981

Description

@zhuangjun1981

Looks like the console and the interpreter cannot accommodate some of the characters generated by the language model.

==============================================

Example1: if I ask the assistant a Chinese question, it will return useful code but the console cannot display the response correctly.
image

==============================================

Example 2: if I ask "User: please plot a sine wave and cosine wave superimposed on each other. "
the code it generated contains special character "pi", such as

# Create x values from 0 to 2π

And the interpreter will spit out an error:

SyntaxError: Non-UTF-8 code starting with '\xa6' in file C:\Users\wood_\PycharmProjects\CodeAIde\generated_code\generated_script_1.0.py on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Looks like the character π is the source of the issue.

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