PoppaDynasty
PoppaDynasty

Reputation: 11

How can I fix SyntaxError in flask_bootstrap?

Is there a fix or a workaround as the SyntaxError points to the __init__.py file as written below?

Executing from flask_bootstrap import Bootstrap on Python shell lands me into a "SyntaxError: invalid syntax".

>>> from flask_bootstrap import Bootstrap
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "./venv/local/lib/python2.7/site-packages/flask_bootstrap/__init__.py", line 62
    blueprint = Blueprint('bootstrap', __name__, static_folder=f'static/{self.static_folder}',                                                                                           ^
SyntaxError: invalid syntax
>>>

This is line 62 of the __init__.py file.

blueprint = Blueprint('bootstrap', __name__, static_folder=f'static/{self.static_folder}',
                      static_url_path=f'/bootstrap{app.static_url_path}',
                      template_folder='templates')
app.register_blueprint(blueprint)

Upvotes: 0

Views: 57

Answers (0)

Related Questions