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

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

Categories
Linux Mastering Development Ubuntu

Upgrade to Ubuntu 20 breaking mysqlclient pip package

Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File “/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/db/backends/mysql/base.py”, line 16, in <module> import MySQLdb as Database File “/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/MySQLdb/__init__.py”, line 18, in <module> from . import _mysql ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory The above exception was the direct cause of […]

Categories
Mastering Development

djangocms – cannot import name ‘NamespaceAlreadyRegistered’

I have developed a simple project with DjangoCMS(3.7.2) and it works great in the local. I ‘m gonna run it on a ubuntu server, which I have another Django project run on it with no issues. Both of my projects are built using python 3.6 & MySQL database. I took these steps to run my […]

Categories
Mastering Development

scrapy not running ModuleNotFoundError: No module named ‘scraper.settings’

I am getting below error while running my scrapy project. I tried everything suggested on stackoverflow but yet nothing has solved the problem. Feel free to ask for more information. Looking forward for any help. (venv) [kalpesh@localhost scraper]$ scrapy crawl mrdeepfakes -a output=db Traceback (most recent call last): File “/home/kalpesh/venv/bin/scrapy”, line 8, in <module> sys.exit(execute()) […]

Categories
Mastering Development

Unable to pass arguments in python3 class

Firstly, I created a class that has __init__() on it in models.py, as you can see below. And when I import it in my views.py, the vscode intellisense also shows that my class takes 4 arguments. But when I try to run the program, it shows me an error saying that the class doesn’t take […]