Flask: model_form: AttributeError: type object 'Form' has no attribute 'query'

This is the error: File"/www/sites/blog/flask/lib/python2.7/sitepackages/flask/app.py", line 1701, in __call__ return self.wsgi_app(environ,...

Error occurred while installing openstack after setting FORCE=yes

I tried installing openstack through devstack using the following commands $ git clone https://github.com/openstack-dev/devstack.git -b stable/havana devstack/ i followed this link to do it. In...

SQLAlchemy inheritance not working

I'm using Flask and SQLAlchemy. I have used my own abstract base class and inheritance. When I try to use my models in the python shell I get the following error: >>> from schedule.models import...

TypeError while adding flask script task

I'm working to modify a cookiecutter Flask app. In the manage.py administrative module based on flask-script, I'm trying to create a new task 'create_admin' that adds a admin user...

Heroku fails to install psycopg2

I am trying to get Heroku to install psycopg2 from requirements.txt, which contains: falcon gunicorn>=19.6.0 gevent>=0.13 ujson SQLAlchemy alembic psycopg2 This results in the following build...

Elastic Beanstalk create got install_dependencies error when installing requirements.txt

------------------------------------- /var/log/eb-activity.log ------------------------------------- Collecting argparse==1.2.1 (from -r /opt/python/ondeck/app/requirements.txt (line 10)) ...

AttributeError: 'PyxImporter' object has no attribute 'find_spec' with Pandas/BigQuery

We're trying to pull some data off of BigQuery using Pandas and running into this absolutely enormous trace about imports. As far as I can tell, all the right dependencies are installed. Traceback...

'DataFrame' object has no attribute 'isna'

I have adapted one machine learning code for one my project.The code that worked fine on my laptop ,now makes problems on my desktop.I am checking all data frame columns for missing values. File...

SQLAlchemy throwing KeyError when using Association Objects with back_populates – example from documentation doesn't work

SQLAlchemy nicely documents how to use Association Objects with back_populates. However, when copy-and-pasting the example from that documentation, adding children to a parent throws a KeyError as...

How to handle importing when testing Flask apps: AssertionError: View function mapping is overwriting an existing endpoint function

I am struggling trying to understand how to write tests in Flask. I've inherited an app that already has a bunch of tests that hit routes like /login and test that the response is what's...

Flask/SQLAlchemy: Incompatible collection type: None is not list-like

I am confused. What's wrong? I have two models, and a many to one relation. I created form Boss_add for adding boss to database. But, nothing works! My models: class User(UserMixin, db.Model): ...

Python Flask SQLite OperationalError when viewing posts of a user

I'm currently following [this][1] tutorial series on how to build a website with Flask, however I'm running across a very frustrating error when I'm just following exactly what the guy is doing....

How to connect vertica with apache superset?

I am trying to connect vertica with apache superset in superset --> add database --> SQLAlchemy URI : vertica+vertica_python://dbadmin:[email protected]:5433/test I am running apache superset in...

Flask: api errorhandler executed two times

I'm doing a Flask API project, and I have a problem with handle the AssertionError exception. So my program check if the length of a specified parameter and raises an AssertionError if the length...

Why SQLAlchemy could not assemble any primary key columns for mapped table?

I am trying to make a flask web application that takes input from the user and saves it into the database (sqlite3). I have defined a class Flight for 'flights' table to register the flights...

Unable to upload image on remote server(Heroku) with my flask app

My app image upload works very well on localhost but when I deployed to Heroku, it gives me Attribute Error and Runtime Error. How do I solve this? I remove the validators on the filefield in my...

How to fix AttributeError: 'Mapper' object has no attribute 'persist_selectable'

i just used this, i'm having an error, please help me to solve it without using sqlalchemy_searchable everything works fine import os from datetime import datetime from flask import Flask from...

SQLAlchemy error: "TypeError: Additional arguments should be named <dialectname>_<argument>, got 'nullable'"

Problem I get an error using Flask when following a tutorial on using Flash. Since I am a basic Python programmer I don't understand why or what is wrong with it. So if you don't mind explaining...

Not able to install requirement file because of wrapt error

Currently I am installing requirement file in using Virtualenv & got unexpected error of wrapt. I have tried to find solution from google but not able to solve my issue. Trackback of error is as...

No Module named Pandas showing in server log but it has been already installed in server

I tried using Pandas for Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-173-generic x86_64) (Server).I want it for Python2.7.I tried sudo pip install pandas and sudo apt-get install python-pandas,pip install...

Why don't SQLAlchemy show up in the search results of `pip3 search SQLAlchemy`?

I wanted to install SQLAlchemy for Python 3 for working with databases. I searched for the package using pip3 search SQLAlchemy, but I didn't find SQLAlchemy as part of the results. Why don't...

Is anyone try to implement Multi-Tenancy in Apache Superset

I tried by cloning from the Github project, but it's not worked for me. Is any other way to achieve multi-tenancy in Apache superset. I tried from this source...

flask_sqlalchemy: error with `__setattr__` to `DefaultMeta`

After re-building a Docker image, I've started to get the following error: $ docker run --rm -it python:3.8-slim /bin/bash ... $ pip install flask_sqlalchemy ... $ python -c "from flask_sqlalchemy...

Git lab CI Running nose tests with SqlAlchemy. ERROR: Failure: TypeError (can't apply this __setattr__ to DefaultMeta object)

I am working on a Flask Application with a Postgres database. When I run nose tests locally everything works fine, but when I upload the code to GitLab this happens in my pipeline. I am using...

TypeError: can't apply this __setattr__ to DefaultMeta object - Flask app - python

The initial problem, I am developing on the flask app framework and I was trying out blueprint template and it update my version of python I think to 3.8.4 and this new error appear. I was on...

SQLAlchemy with IBM_DB throwing error driver not found

>python Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from sqlalchemy...

TypeError: Additional arguments should be named <dialectname>_<argument>, got 'nullable'

I am currently working on my flask app, its a application for book repository for final year students, where they can upload their final year projects and other relevant books for other students,...

Fastapi database test isolation with the starlette configuration

how to exactly configure a database for test purposes. I am doing something wrong, I have read the starlette configuration on the website but I think I did not understand it correctly. I tried to...

ERROR: Failed building wheel for psycopg2 (Ubuntu 20.04 + Python 3.8.5 + venv)

Greetings wisdom from Stackoverflow! I'm having issues building wheel for psycopg2 thru pip install -r requirements.txt. I'm on ubuntu 20.04 + python 3.8.5 + venv. This is my...

How to install osmnx in Python?

I am trying to use osm library in Python. I found a recommended package called osmnx. I installed it via the command: python -m pip install osmnx when I type: py -m pip freeze I...