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

Can’t start virt-manager due to python errors: EOFError: marshal data too short

I have been happily using KVM and virt-manger on Arch Linux for about a year now. This morning, one of my VMs broke (that is another story which I don’t think is related), and I decided that it would just be easiest to delete it and virt-install again. However, after deleting this VM via the […]

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 14.04 How do I fix the imaplib.readonly error?

I’m trying to use an imap script to view emails from a server. My script is able to log in fine, I get the ‘OK Logged in’ message, it’s able to list the mailvoxes and dump untagged responses. After this, the message is as follows: File “imap_email.py”, line 134, in <module> mailbox = get_mailbox(connection) File […]

Categories
Development Linux

How do I fix the imaplib.readonly error?

I’m trying to use an imap script to view emails from a server. My script is able to log in fine, I get the ‘OK Logged in’ message, it’s able to list the mailvoxes and dump untagged responses. After this, the message is as follows: File “imap_email.py”, line 134, in <module> mailbox = get_mailbox(connection) File […]

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

Using OpenCL optimization instead of Multiprocessing pool map

In the first version of my code, I used the Multiprocessing library of python, applied on a main function MAIN_LOOP on 16 threads like this : def MAIN_LOOP(lll, seed=None): global aa global bb aa, bb = 0,0 if paramo == 0: C_ij_GG, C_ij_LL, C_ij_GL = np.zeros((len(zrange), len(zrange))), np.zeros((len(zrange), len(zrange))), np.zeros((len(zrange), len(zrange))) C_ij_GG_up, C_ij_LL_up, C_ij_GL_up = […]