Categories
Mastering Development

Server-DB Communication Issue at Built

Setup Consider this relatively simple docker-app using fastapi as server and couchdb as db. Here is the project structure ├── app.py ├── compose │   ├── couchdb.Dockerfile │   └── server.Dockerfile ├── docker-compose.yml ├── .env # Global vars e.g. DB credentials ├── Pipfile # For local dev ├── Pipfile.lock # Same └── requirements.txt Here are is my […]

Categories
Mastering Development

SQL-Alchemy Module Not Found Error on Google App Engine

I’m trying to make work my first App Engine on Google Cloud but I’m facing a problem. I have not found any response on the web. On standard environment, this is my app.yaml : runtime: python38 handlers: # This configures Google App Engine to serve the files in the app’s static # directory. – url: […]

Categories
Mastering Development

bad request(400) django-postgresql page error in gcp

my application was successfully deployed to google cloud platform. when i run command glcoud app browse it shows a blank page with bad request(400). this is the details of the error. my app runs well locally. where is the problem coming from? is there any command for checking if everything is perfectly setup in my […]

Categories
Mastering Development

No module “AppName” error while running python manage.py

I am trying to follow this tutorial related to Django Rest Framework, on running python manage.py I am getting an error: File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module […]

Categories
Mastering Development System & Network

ModuleNotFoundError: No module named ‘tiwari.wsgi’

I try to deploy my project on google cloud I get error ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error! Code: APP_CONTAINER_CRASHED [2020-07-17 06:48:45 +0000] [6] [INFO] Starting gunicorn 20.0.4 [2020-07-17 06:48:45 +0000] [6] [INFO] Listening at: http://0.0.0.0:8080 (6) [2020-07-17 06:48:45 +0000] [6] [INFO] Using worker: sync [2020-07-17 06:48:45 +0000] [9] [INFO] Booting worker with […]

Categories
Mastering Development

Wine not running on google cloud run

This is my docker file, which is installing wine in order to run some exes that I want to, on Google cloud run: ARG BASE_IMAGE="ubuntu" ARG TAG="latest" FROM ${BASE_IMAGE}:${TAG} # Install prerequisites RUN apt-get update \ && DEBIAN_FRONTEND="noninteractive" apt-get install -y –no-install-recommends \ apt-transport-https \ ca-certificates \ cabextract \ git \ gosu \ gpg-agent \ […]

Categories
Mastering Development

Django cannot find GDAL on windows 10 64 bit

I am using PyCharm and Python 3.8 – 64 bit. I am trying to learn to implement GeoDjango and Leaflet with a Postgis database. I have a postgresql database with postgis extension. I also have psycopg2 installed following the comments from this earlier thread of mine. psycopg2 not detected by postgres django In settings.py, DATABASES […]

Categories
Mastering Development

connexion jsonschema.exceptions- Unknown type ‘str’ for validator with schema:

I used flask and connexion for my api, I got python server stub from swagger editor and it was generated based on api spec. However, one of my endpoint make request with json data, it should be validated by json schema validator. I used jsonschema python library for that. But, now when I test endpoint […]

Categories
Database Development

Explaining recurring crash in postgresql deployment

I’m having trouble with unexpected system crashes emanating from a postgresql deployment on a moderately busy production server (Django 1.8 app deployed on DO droplet with a gunicorn application server and nginx reverse proxy). I’m an accidental DBA and need an expert’s opinion on piecing together what’s going on. I have no clue right now; […]

Categories
Mastering Development

RuntimeError: __class__ not set defining ‘AbstractBaseUser’ as

I’m getting this error while trying to migrate databases after manually setting up PostgreSQL database for the project. I was trying to run the cloned quora project forked from github when this error cropped up. Follow the full error description: RuntimeError: __class__ not set defining ‘AbstractBaseUser’ as <class ‘django.contrib.auth.base_user.Abstract BaseUser’>. Was __classcell__ propagated to type.__new__? […]