microsoft / studentambassadors

This repository is for Microsoft Learn Student Ambassadors.
MIT License
130 stars 47 forks source link

AI bugbash #130

Closed Aromal-vk closed 1 year ago

Aromal-vk commented 1 year ago

Describe the bug

error in sample code give in Exercise - Call Translator service in Build an AI web app by using Python and Flask module. error:

IndentationError: unexpected unindent

found in the part:

def index_post():

Read the values from the form

original_text = request.form['text']
target_language = request. Form['language']

To Reproduce

Follow the instructions and copy the code from the module

image image

Desktop

Additional context

Add any other context about the problem here.


🎓 Add a tag to this issue for your current education role: student, Student Ambassador or educator.

Student Ambassador


BethanyJep commented 1 year ago

can you try this instead:

def index_post():
  # Read the values from the form
  original_text = request.form['text']
  target_language = request. Form['language']
Aromal-vk commented 1 year ago

I was able to fix the error by adding an extra indentation image

BethanyJep commented 1 year ago

Great!