Giter Site home page Giter Site logo

flask-example's Issues

sqlite3.OperationalError

Hello, I am starting with Flask and I would like to know why this error persists? I have the impression that users.db is empty but since PyCharm I can't do anything to see inside

image

Outdated Dependencies - ImportError: cannot import name 'escape' from 'jinja2'

Following the guide, the application fails to launch due to "old" dependencies. Here's the exact error

Traceback (most recent call last):
  File "/home/<uname>/flask-example/app.py", line 4, in <module>
    from flask import Flask, session, url_for, redirect, render_template, request, abort, flash
  File "/home/<uname>/.local/lib/python3.9/site-packages/flask/__init__.py", line 14, in <module>
    from jinja2 import escape
ImportError: cannot import name 'escape' from 'jinja2' (/home/<uname>/.local/lib/python3.9/site-packages/jinja2/__init__.py)

Shouldn't matter too much, but here's my system information (running Ubuntu 22.04 LTS on Raspi 4b):

python3 -- version
> Python 3.9.2

python3 -m pip --version
> pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)

uname -a
> Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

lsb_release -a
> Distributor ID:	Debian
> Description:	Debian GNU/Linux 11 (bullseye)
> Release:	11
> Codename:	bullseye

I believe this is due to Flask version being too "old". Upgrading to newer version (e.g. =< 2.0) should fix the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.