Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 名称错误:名称';从_dbsnapshot';在使用BOTO python模块时未定义_Python 3.x_Amazon Web Services_Pycharm_Boto_Rds - Fatal编程技术网

Python 3.x 名称错误:名称';从_dbsnapshot';在使用BOTO python模块时未定义

Python 3.x 名称错误:名称';从_dbsnapshot';在使用BOTO python模块时未定义,python-3.x,amazon-web-services,pycharm,boto,rds,Python 3.x,Amazon Web Services,Pycharm,Boto,Rds,我想使用amazon Web services(AWS)将我的RDS实例从RDS快照恢复为在云上运行,我使用的是Pycharm 3+,使用脚本语言的此代码的AWS CLI等价物是: aws rds从数据库快照还原数据库实例 Python等效代码如下所示: 导入boto.rds restore\u dbinstance\u from_dbsnapshot('oracledev-final-snapshot','oracleid',db.m1.small,1521,'east-1') 但当我运行时,

我想使用amazon Web services(AWS)将我的RDS实例从RDS快照恢复为在云上运行,我使用的是Pycharm 3+,使用脚本语言的此代码的AWS CLI等价物是: aws rds从数据库快照还原数据库实例

Python等效代码如下所示: 导入boto.rds
restore\u dbinstance\u from_dbsnapshot('oracledev-final-snapshot','oracleid',db.m1.small,1521,'east-1')

但当我运行时,我得到了标题中提到的上述错误。 谁能帮我一下吗。
提前感谢

我没有使用Pycharm,但我使用ipython进行CLI测试和LiClipse这样做:

#import the module
import boto.rds
#connect to the region - you'll need your AWS info as the second two parameters if it isn't pre-configured
conn=boto.rds.get_all_connections("us-east-1")
#now is when you call the db creation, but from the connection
conn.restore_dbinstance_from_dbsnapshot('oracledev-final-snapshot','oracleid',db.m1.small,1521,'east-1')

您能否显示导致问题的实际代码?没有上下文,很难知道该建议什么。boto RDS模块有一个
restore\u dbinstance\u from\u dbsnapshot
方法。