Skip to content
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]: UnicodeEncodeError: 'gbk' codec can't encode character '\ufeff' #831

Open
chatterzhao opened this issue Mar 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@chatterzhao
Copy link

Version

VisualStudio Code extension

Operating System

Windows 10

What happened?

---------- GPT PILOT EXITING WITH ERROR ----------
Traceback (most recent call last):

File "d:\code\GPT_Pilot\gpt-pilot\pilot\main.py", line 126, in
started = project.start()
^^^^^^^^^^^^^^^

File "d:\code\GPT_Pilot\gpt-pilot\pilot\helpers\Project.py", line 224, in start
self.developer.start_coding('app')

File "d:\code\GPT_Pilot\gpt-pilot\pilot\helpers\agents\Developer.py", line 92, in start_coding
self.implement_task(i, task_source, dev_task)

File "d:\code\GPT_Pilot\gpt-pilot\pilot\helpers\agents\Developer.py", line 216, in implement_task
result = self.execute_task(convo_dev_task,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "d:\code\GPT_Pilot\gpt-pilot\pilot\helpers\agents\Developer.py", line 548, in execute_task
result = self.step_save_file(convo, step, i, test_after_code_changes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "d:\code\GPT_Pilot\gpt-pilot\pilot\helpers\agents\Developer.py", line 270, in step_save_file
code_monkey.implement_code_changes(convo, data)

File "d:\code\GPT_Pilot\gpt-pilot\pilot\helpers\agents\CodeMonkey.py", line 98, in implement_code_changes
content = self.replace_complete_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "d:\code\GPT_Pilot\gpt-pilot\pilot\helpers\agents\CodeMonkey.py", line 167, in replace_complete_file
llm_response = convo.send_message('development/implement_changes.prompt', {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "d:\code\GPT_Pilot\gpt-pilot\pilot\helpers\AgentConvo.py", line 104, in send_message
self.log_message(message_content)

File "d:\code\GPT_Pilot\gpt-pilot\pilot\helpers\AgentConvo.py", line 244, in log_message
print(f"\n{content}\n", type='local')

File "d:\code\GPT_Pilot\gpt-pilot\pilot\utils\custom_print.py", line 17, in print_to_external_process
local_print(*args, **kwargs)

File "d:\code\GPT_Pilot\gpt-pilot\pilot\utils\custom_print.py", line 38, in local_print
built_in_print(message, **kwargs)

File "d:\code\GPT_Pilot\gpt-pilot\pilot-env\Lib\site-packages\colorama\ansitowin32.py", line 47, in write
self.__convertor.write(text)

File "d:\code\GPT_Pilot\gpt-pilot\pilot-env\Lib\site-packages\colorama\ansitowin32.py", line 177, in write
self.write_and_convert(text)

File "d:\code\GPT_Pilot\gpt-pilot\pilot-env\Lib\site-packages\colorama\ansitowin32.py", line 205, in write_and_convert
self.write_plain_text(text, cursor, len(text))

File "d:\code\GPT_Pilot\gpt-pilot\pilot-env\Lib\site-packages\colorama\ansitowin32.py", line 210, in write_plain_text
self.wrapped.write(text[start:end])

UnicodeEncodeError: 'gbk' codec can't encode character '\ufeff' in position 7: illegal multibyte sequence


@chatterzhao chatterzhao added the bug Something isn't working label Mar 31, 2024
@techjeylabs
Copy link
Collaborator

it looks like our enviroment is not proper setup. What python version have u got installed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants