DjangoPostgres-tutorial

shiino takafumi 0 Reputation points
2023-04-13T05:48:35.1833333+00:00

私はチュートリアル(下記リンク)を参考にフレキシブル サーバーを使用して Django アプリをデプロイしようとしてます。 I am trying to deploy a Django app using a flexible server with the tutorial (link below). https://learn.microsoft.com/ja-jp/azure/postgresql/flexible-server/tutorial-django-app-service-postgres?tabs=clone However, when the following command is executed

az webapp up --resource-group myresourcegroup --location japaneast --plan DjangoPostgres-tutorial-plan --sku B1 --name testWEBUI001

下記のようなエラーがでました。 Error

The command failed with an unexpected error. Here is the traceback:
'cp932' codec can't decode byte 0xef in position 23: illegal multibyte sequence
Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 718, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/commands.py", line 45, in _ex_handler
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 4739, in webapp_up
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 4752, in _set_webapp_up_default_args
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/config.py", line 155, in set_value
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/config.py", line 240, in set_value
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/config.py", line 230, in set
  File "configparser.py", line 699, in read
  File "configparser.py", line 1022, in _read
UnicodeDecodeError: 'cp932' codec can't decode byte 0xef in position 23: illegal multibyte sequence
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
To open a new issue, please run `az feedback`

原因または対象法はわかりますか? Do you know the cause or target method? Thanks.

Azure Database for PostgreSQL
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 17,731 Reputation points Microsoft Employee Moderator
    2023-04-17T00:59:09.8366667+00:00

    I'm sorry to hear that you're experiencing an error while trying to deploy your Django app using a flexible server. Based on the error message you provided, it seems like there might be an issue with the encoding of the configuration file that the az webapp up command is trying to read. Specifically, it looks like the file is encoded in cp932, which is a Japanese encoding, and the command is having trouble decoding a byte sequence that it encountered.

    To resolve this issue, you can try changing the encoding of the configuration file to UTF-8, which is a more widely used encoding and should be compatible with the az webapp up command. You can use a text editor that supports changing the encoding of a file, such as Visual Studio Code, to do this.

    Alternatively, you can try running the az webapp up command with the --verbose flag to get more detailed output about what the command is doing and where it might be encountering an issue. This might help you identify the root cause of the problem and find a solution.

    I hope this helps! Let me know if you have any other questions or concerns.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.