未知的服务错误botocore

时间:2018-01-17 18:40:56

标签: python amazon-web-services aws-sdk boto3 botocore

我尝试使用最近的亚马逊转录服务:

transcribe = boto3.client('transcribe')

我收到以下错误:

botocore.exceptions.UnknownServiceError: Unknown service: 'transcribe'. Valid service names are: ...

我尝试使用以下方法升级boto3和botocore:

pip install botocore --upgrade
pip install boto3 --upgrade

1 个答案:

答案 0 :(得分:5)

该功能尚未登陆 import smtplib import os from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from email import encoders from os import path from glob import glob email_user = '#sender address#' email_send = '#reciever address#' subject = 'Subject' msg = MIMEMultipart() msg['From'] = email_user msg['To'] = email_send msg['Subject'] = subject body = "Hello:\nPlease find attached the reports" msg.attach(MIMEText(body, 'plain')) path = (r'''#path of the files to be attached''') files = [f for f in os.listdir(path) if os.path.isfile(f)] filenames = filter(lambda f: f.endswith(('.pdf','.PDF')), files) for filename in filenames: attachment = open(filename, 'rb') part = MIMEBase('application', 'octet-stream') part.set_payload((attachment).read()) encoders.encode_base64(part) part.add_header('Content-Disposition',"attachment; filename = "+filename) msg.attach(part) text = msg.as_string() server = smtplib.SMTP('smtp.gmail.com',587) server.starttls() server.login(email_user,'#password#') server.sendmail(email_user,email_send,text) server.quit() 。遗憾的是,usage examples已经出现在AWS文档中,而这些服务定义尚未发布到PyPI。

观看PR 1356进行合并。