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

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
Mastering Development

super().__init__(*args, **kwargs) TypeError: __init__() got an unexpected keyword argument ‘max_lenght’

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 “C:\Users\MobilineWest\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\management\__init__.py”, line 401, in execute_from_command_line utility.execute() File “C:\Users\MobilineWest\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\management\__init__.py”, line 377, in execute django.setup() File “C:\Users\MobilineWest\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\__init__.py”, line 24, in setup apps.populate(settings.INSTALLED_APPS) File “C:\Users\MobilineWest\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\apps\registry.py”, line 114, in populate app_config.import_models() File “C:\Users\MobilineWest\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\apps\config.py”, line 211, in import_models self.models_module = […]

Categories
Linux Mastering Development Ubuntu

I get an error message when I try to launch anaconda in unbuntu

I am running the most up to date version of unbuntu. I just reinstalled anaconda3 twice since it stopped working. I get this error message. What does it mean? I also updated from Python 3.6 to 3.7 which broke my terminal. So I switched the language back to 3.6 in xterm. (base) bryan@bryan-Inspiron-5559:~$ anaconda-navigator Traceback […]

Categories
Development

application call . TypeError: view must be a callable or a list/tuple in the case of include()

I am taking a course where this error does not occur my error is cod is: Exception in thread django-main-thread: Traceback (most recent call last): File “C:\Users\wuoel\AppData\Local\Programs\Python\Python38-32\lib\threading.py”, line 932, in _bo otstrap_inner self.run() File “C:\Users\wuoel\AppData\Local\Programs\Python\Python38-32\lib\threading.py”, line 870, in run self._target(*self._args, **self._kwargs) File “C:\Users\wuoel\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\utils\auto reload.py”, line 53, in wrapper fn(*args, **kwargs) File “C:\Users\wuoel\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\core\manag ement\commands\runserver.py”, line 117, […]

Categories
Development

Django: ImportError: cannot import name ‘Celery’ from ‘celery’

So I’ve installed celery and got the file celery_tasks_settings.py in my project directory next to settings.py. This I got was a way to avoid conflicts with the package itself. I also did find -name ‘*celery*.pyc’ as a way to find any celery.pyc files that may have been generated before.The result: /__pycache__/celery_tasks.cpython-38.pyc /__pycache__/celery_tasks_settings.cpython-38.pyc Unfortunately, I still […]

Categories
Development

ModuleNotFoundError: No module named Foo – How can I import a model into a Django app’s script?

My Django skill level: noob. I am going nuts at setting the DJANGO_SETTINGS_MODULE properly to finally get my model imported within a script. I use a virtualenv for my project. This is my current error: ModuleNotFoundError: No module named ‘dashex’ And the according feeder.py script: import os import sys os.environ[‘DJANGO_SETTINGS_MODULE’] = ‘dashex.settings’ sys.path.append(‘os.path.dirname(os.path.dirname(os.path.abspath(__file__)))’) import django […]