Reputation: 93
I am trying to run my Flask routes in Catalyst python advanced I/O function. You can find my code snippet mentioned below:
import logging
from flask import Request, make_response, jsonify,Flask
import zcatalyst_sdk
'''
Execute below command to install SDK in global for enabling code suggestions
-> python3 -m pip install zcatalyst-sdk
'''
app = Flask(__name__)
@app.route('/')
def home():
return jsonify({"message": "Hello, World!"})
if __name__ == '__main__':
app.run(debug=True)
When running their app using catalyst serve I am getting the following error:
ERROR AttributeError("module '' has no attribute 'handler'")
Traceback (most recent call last):
File "/Users/raghuraja/Library/Application Support/zcatalyst-cli-runtimes/python/zcatalyst_runtime_39/main.py", line 69, in customer_request_handler
FLAVOUR_HANDLER.invoke_handler()
File "/Users/raghuraja/Library/Application Support/zcatalyst-cli-runtimes/python/zcatalyst_runtime_39/flavours/__init__.py", line 49, in invoke_handler
CUSTOMER_CODE_ENTRYPOINT = module.handler
AttributeError: module '' has no attribute 'handler'
Upvotes: 0
Views: 24