SyntaxError in Flask while using Flash in python

I’m getting an error while i use flash,it’s like-

plabon@plabon-H110M-S2PV-DDR3:~/Desktop/flask$ python
  File "", line 40
    flash(f'Account created for {}!','success')
SyntaxError: invalid syntax

Can you please take a look in my code and help me to know where i am making mistakes?
I am giving all of my code in Ubuntu paste bin,

I am suspicious of the f at the start of your string.

I’m trying to learning flask by YouTube tutorial.I did what he did.Can you please take a look please.

I set this link on specific time.

What version of Python are you using?

i have installed Python 2.7.18rc1 and Python 3.8 both :frowning:

It looks like you’re trying to run python with points to Python 2. What happens if you use python3 .... in the command line?

If i run python3 in the command line it opens python 3.8.2 version.Is python 2 is default version here?Should i try to change this? :roll_eyes:

Did you run python3

No,i didn’t before.But it shows like that.

I am not familiar with Flask, but I’d try installing the email validator next.


Woaooo :grin: :heart_eyes: :star_struck: :star_struck: :star_struck:
Thank you so much from bottom of my heart :sparkling_heart:
Everything working well now :grin:

1 Like