You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: 'utf-8' codec can't decode byte 0x95 in position 147: invalid start byte
Traceback:
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\cli\cli_config_file.py", line 347, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\telemetry\metric.py", line 185, in wrapped
raise exception # pylint: disable=raising-bad-type
^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\telemetry\metric.py", line 150, in wrapped
return_value = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\utils\version_checker.py", line 43, in wrapped
actual_result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\cli\main.py", line 95, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\build\command.py", line 169, in cli
do_cli(
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\build\command.py", line 258, in do_cli
ctx.run()
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\build\build_context.py", line 284, in run
self._build_result = builder.build()
^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\build\app_builder.py", line 192, in build
build_graph = self._get_build_graph(self._container_env_var, self._container_env_var_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\build\app_builder.py", line 236, in _get_build_graph
build_graph = BuildGraph(self._build_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\build\build_graph.py", line 209, in __init__
self._atomic_read()
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\build\build_graph.py", line 443, in _atomic_read
self._read()
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\build\build_graph.py", line 415, in _read
txt = self._filepath.read_text()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathlib.py", line 1028, in read_text
File "<frozen codecs>", line 322, in decode
An unexpected error was encountered while executing "sam build".
Search for an existing issue:
https://github.com/aws/aws-sam-cli/issues?q=is%3Aissue+is%3Aopen+Bug%3A%20sam%20build%20-%20UnicodeDecodeError
Or create a bug report:
https://github.com/aws/aws-sam-cli/issues/new?template=Bug_report.md&title=Bug%3A%20sam%20build%20-%20UnicodeDecodeError
Expected result:
sam build success
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
OS:Windows 10
sam --version:SAM CLI, version 1.125.0
AWS region:ap-northeast-1
Python:Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun 6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)] on win32
Also, it will be useful if you can provide an example project we can use to re-produce on our side.
mndeveci
added
blocked/more-info-needed
More info is needed from the requester. If no response in 14 days, it will become stale.
and removed
stage/needs-triage
Automatically applied to new issues and PRs, indicating they haven't been looked at.
labels
Oct 16, 2024
Glad to hear that. .aws-sam folder should only be edited by SAM CLI, my assumption is an external tool changed or deleted a file which caused this problem.
Resolving this issue now but please let us know if you experience another problem in the future.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Description:
When Run
sam build --no-cached --debug
I get error as below:
Error: 'utf-8' codec can't decode byte 0x95 in position 147: invalid start byte
Steps to reproduce:
template.yaml
samconfig.toml
Observed result:
Expected result:
sam build success
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
:SAM CLI, version 1.125.0Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: