我有以下代码
pathToFile = "R:\T2 Output\12345--01--Some File 1--ABCD.mp4"
process = subprocess.Popen(['ffprobe.exe', '-show_streams', '"'+pathToFile+'"'],
shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Run Code Online (Sandbox Code Playgroud)
我收到错误:
[Error 2] The system cannot find the file specified
Run Code Online (Sandbox Code Playgroud)
我尝试过的:
注意事项:
我确定我错过了一些简单的事情.谁能指出我正确的方向?我已经在这个网站和其他人上做了很多搜索并尝试了一些建议.
我一直在尝试创建一个Terraform脚本来创建具有链接的auth和unauth角色的cognito用户池和身份池,但是我找不到一个很好的例子。这是我到目前为止的内容:
cognito.tf:
resource "aws_cognito_user_pool" "pool" {
name = "Sample User Pool"
admin_create_user_config {
allow_admin_create_user_only = false
}
/* More stuff here, not included*/
}
resource "aws_cognito_user_pool_client" "client" {
name = "client"
user_pool_id = "${aws_cognito_user_pool.pool.id}"
generate_secret = true
explicit_auth_flows = ["ADMIN_NO_SRP_AUTH"]
}
resource "aws_cognito_identity_pool" "main" {
identity_pool_name = "SampleIdentityPool"
allow_unauthenticated_identities = false
cognito_identity_providers {
client_id = "${aws_cognito_user_pool_client.id}"
provider_name = ""
server_side_token_check = true
}
}
Run Code Online (Sandbox Code Playgroud)
因此,我想为此添加一个auth角色和一个unauth角色,但我仍在设法了解如何在terraform中定义和链接IAM角色,但这是到目前为止的内容:
resource "aws_cognito_identity_pool_roles_attachment" "main" {
identity_pool_id = "${aws_cognito_identity_pool.main.id}"
roles {
"authenticated" = <<EOF
{
actions = …Run Code Online (Sandbox Code Playgroud)