Azure Powersh中出现特殊的“找不到文件”pscloudshell错误

2024-06-06 16:26:10 发布

您现在位置:Python中文网/ 问答频道 /正文

这很奇怪。我正在我的Azure帐户中运行Azure Powershell 5.0.1,并尝试创建一个应用程序服务计划来支持this tutorial;步骤

az appservice plan create --name myAppServicePlan --resource-group myResourceGroup --sku FREE

下面的错误消息引用了“pscloudshell”文件(我已确认我的Azure帐户上不存在该文件)。在

我试过了 -验证文件是否存在(不存在) -对字符串“pscloudshell”和“FileNotFoundError:[winerror3]pscloudshell”(但非常稀疏)进行web搜索

  • 对字符串“pscloudshell”的Stackoverflow进行搜索,以查找“您的搜索未返回匹配项”。我一定是第一个经历这种事的人?!在

我所说的错误是

^{pr2}$

az-v给出:

azure-cli (2.0.22)

acr (2.0.16)
acs (2.0.21)
advisor (0.1.0)
appservice (0.1.21)
backup (1.0.3)
batch (3.1.7)
batchai (0.1.3)
billing (0.1.6)
cdn (0.0.10)
cloud (2.0.10)
cognitiveservices (0.1.9)
command-modules-nspkg (2.0.1)
configure (2.0.12)
consumption (0.2.0)
container (0.1.14)
core (2.0.22)
cosmosdb (0.1.15)
dla (0.0.15)
dls (0.0.18)
eventgrid (0.1.5)
extension (0.0.6)
feedback (2.0.6)
find (0.2.7)
interactive (0.3.11)
iot (0.1.14)
keyvault (2.0.14)
lab (0.0.13)
monitor (0.0.13)
network (2.0.18)
nspkg (3.0.1)
profile (2.0.15)
rdbms (0.0.9)
redis (0.2.10)
reservations (0.1.0)
resource (2.0.19)
role (2.0.15)
servicefabric (0.0.6)
sql (2.0.16)
storage (2.0.20)
vm (2.0.19)

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\ContainerAdministrator\CloudDrive\.pscloudshell\.azure\cliextensions'

Python (Windows) 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Tags: 文件字符串app应用程序错误service帐户azure
2条回答

您尝试在云shell的PowerShell控制台中运行Azure CLI命令,而应该在云shell的Bash shell中运行Azure CLI命令。 enter image description here

I've tried - verifying that the file exists (it doesn't)

我用一个旧的云shell重现你的错误,我在那个目录中找不到.pscloudshell。在

然后我将其从Azure资源组中删除并创建一个新的云shell,它工作正常:

PS C:\Users\ContainerAdministrator\CloudDrive> pwd

Path
  
C:\Users\ContainerAdministrator\CloudDrive


PS C:\Users\ContainerAdministrator\CloudDrive> ls


    Directory: C:\Users\ContainerAdministrator\CloudDrive


Mode                LastWriteTime         Length Name
                        -               
d  -       12/13/2017   4:30 AM                .pscloudshell

Azure云shell似乎有一些更新,请删除您的原始云shell并重新创建一个新的。在

相关问题 更多 >