Categories
Mastering Development

how to fix “import keras not working” error

I have used Keras remotely, such as on Colab and AWS. Today, I tried to install Keras on my laptop using pip3 install keras, and the message was that keras was already installed on the computer (I must have installed it before): WARNING: pip is being invoked by an old script wrapper. This will fail […]

Categories
Mastering Development

Heroku with Docker release failed – ModuleNotFoundError: No module named ‘users.apps’

I’ve been following a book tutorial that uses docker with Django. When I used the command ‘git push heroku master’, I get the following output: Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 377, […]

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

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

RecursionError at /graphql. maximum recursion depth exceeded

Problem Definition: I have read the article about adding JWT authentication my project using graphene-jwt package from this official link. According to what is said in the tutorial, some changes should be applied to the project settings.py file: First of all the package should be installed: pip3 install django-graphql-jwt Add AuthenticationMiddleware to MIDDLEWARE variable. MIDDLEWARE […]

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

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__? […]