對命令列上的轉換進行故障診斷 - Amazon Q Developer

對命令列上的轉換進行故障診斷

以下資訊可協助您針對使用 Amazon Q Developer 在命令列上轉換應用程式時常見的問題進行故障診斷。

為什麼我的持有人權杖未重新整理?

如果您看到以下錯誤,表示您需要重新整理用於身分驗證的持有人權杖。

Refreshing bearer token ('Error refreshing bearer token due to: ', InvalidGrantException('An error occurred (InvalidGrantException) when calling the CreateToken operation: ')) ('Error getting bearer token due to: ', RuntimeError(('Error refreshing bearer token due to: ', InvalidGrantException('An error occurred (InvalidGrantException) when calling the CreateToken operation: '))))

若要解決此錯誤,請執行下列命令:

rm ~/.aws/qcodetransform/credentials.json

移除過時的憑證檔案後,再次執行 qct transform 以重新啟動轉換。

為什麼未使用最新版本的命令列工具?

即使您下載新版的命令列工具進行轉換,系統有時仍會使用舊版工具。

若要確保您使用最新版的工具,請下載最新版本。然後根據您的電腦架構,執行下列命令並包含您將工具解壓縮所在的路徑:

Linux_aarch64
pip install <path/to/unzipped-tool>/Linux_aarch64/amzn_qct_cli-1.2.1-py3-none-any.whl --force-reinstall
Linux_x86_64
pip install <path/to/unzipped-tool>/Linux_x86_64/amzn_qct_cli-1.2.1-py3-none-any.whl --force-reinstall
注意

如果您使用較舊的命令列工具版本進行轉換,請將 1.2.1 取代為您下載的版本