-1

I am trying to access a path parameter using chalice but it's giving me a syntax error.

py file

@app.route('/someValue/{indicator}', methods=['GET']
def get_indicator_value(indicator):

Gives me this error mentioned below:

[ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'test': invalid syntax (test.py, line 74)
Traceback (most recent call last):
  File "/var/task/test.py" Line 74
    def some_value(indicator):

What am I missing here ?

user78910
  • 349
  • 2
  • 12
Naxi
  • 1,504
  • 5
  • 33
  • 72

1 Answers1

1

In the first line, you are missing the ) at the end. This is the fixed code:

@app.route('/someValue/{indicator}', methods=['GET'])
def get_indicator_value(indicator):
AksLolCoding
  • 157
  • 10