-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]:Workstation does not support Chinese characters? #513
Comments
Thank you for your feedback. To help us identify the issue, could you please specify which feature and version of Workstation you were using when you encountered the problem? For example, were you using the "Export Python Code" feature, running JSON/Python as Gradio, or another function? This information will assist us in addressing the bug more effectively. |
When I press the "run this workflow" button, the terminal show the SyntaxError. |
The code works fine on macOS, but I suggest including a specific modification in the Python code for improved cross-platform compatibility. You can enhance the script by modifying the following lines in AgentScope/src/agentscope/web/workstation/workflow_dag (lines 150-154): # Combine header and body to form the full script
script = (
"# -*- coding: utf-8 -*-\n"
f"{header}\n\n\n{main_body}\n\nif __name__ == "
f"'__main__':\n main()\n"
) We will update the code base for win support, thanks for your feedback. |
There's no problem now. Thanks you! |
Workstation bug:
When I fill in Chinese characters in the content of the message or the system prompt of the agent in the workflow, an error message appears:
SyntaxError: Non-UTF-8 code starting with '\xc4' in file C:\Users\Lenovo\AppData\Local\Temp\tmpw0lirvil.py on line 31, but no encoding declared; see https://peps.python.org/pep-0263/ for details
In fact, in the Grop Chat example, the system prompt of angents already contains a few Chinese characters - single quotation marks. I need to change them before it can start.
The text was updated successfully, but these errors were encountered: