2016-12-19 89 views
1

我在zappa中很新。目前我正在嘗試使用zappa來部署我的燒瓶項目。使用Zappa部署Flask應用程序時出錯

雖然我的部署應用程序瓶我得到這個錯誤

Traceback (most recent call last): 
    File "c:\users\tanvir\virenvfordeployment\env\lib\site-packages\zappa\cli.py", line 1847, in handle 
    sys.exit(cli.handle()) 

    File "c:\users\tanvir\virenvfordeployment\env\lib\site-packages\zappa\cli.py", line 345, in handle 
    self.dispatch_command(self.command, environment) 

    File "c:\users\tanvir\virenvfordeployment\env\lib\site-packages\zappa\cli.py", line 379, in dispatch_command 
    self.update() 

    File "c:\users\tanvir\virenvfordeployment\env\lib\site-packages\zappa\cli.py", line 605, in update 
    endpoint_url = self.deploy_api_gateway(api_id) 

    File "c:\users\tanvir\virenvfordeployment\env\lib\site-packages\zappa\cli.py", line 1816, in deploy_api_gateway 
    cloudwatch_metrics_enabled=self.zappa_settings[self.api_stage].get('cloudwatch_metrics_enabled', False), 

    File "c:\users\tanvir\virenvfordeployment\env\lib\site-packages\zappa\zappa.py", line 1014, in deploy_api_gateway 
    variables=variables or {} 

    File "c:\users\tanvir\virenvfordeployment\env\lib\site-packages\botocore\client.py", line 251, in _api_call 
    return self._make_api_call(operation_name, kwargs) 

    File "c:\users\tanvir\virenvfordeployment\env\lib\site-packages\botocore\client.py", line 513, in _make_api_call 
    api_params, operation_model, context=request_context) 

    File "c:\users\tanvir\virenvfordeployment\env\lib\site-packages\botocore\client.py", line 566, in _convert_to_request_dict 
    api_params, operation_model) 

    File "c:\users\tanvir\virenvfordeployment\env\lib\site-packages\botocore\validate.py", line 270, in serialize_to_request 
    raise ParamValidationError(report=report.generate_report()) 

ParamValidationError: Parameter validation failed: 
Invalid type for parameter restApiId, value: None, type: <type 'NoneType'>, valid types: <type 'basestring'> 

有誰知道爲什麼這個錯誤即將或者我怎麼能解決這個問題?

回答

1

我不知道很多關於扎帕,但錯誤信息中明確指出你的問題:

Invalid type for parameter restApiId, value: None, type: <type 'NoneType'>, valid types: <type 'basestring'> 

在我看來,你沒有設置參數restApiId,其中應該包含類型的值basestring。我不確定那個參數是關於什麼的,但它似乎必須對AWS-CLI做些什麼。

相關問題