Categories
Linux Mastering Development

abrt tuned: _libudev.py:219:check_errno:EnvironmentError: [Errno 1] Operation not permitted: None

After installing with yum groupinstall "GNOME Desktop" "Graphical Administration Tools" the XRDP client on CentOS 7 I receive each time the server boots an email with the below content. Any idea what is going wrong, how can I fix it? reason: _libudev.py:219:check_errno:EnvironmentError: [Errno 1] Operation not permitted: None cmdline: /usr/bin/python2 -Es /usr/sbin/tuned -l -P executable: […]

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

ModuleNotFoundError in custom module on azure webapps

I’m trying to run an app.py made with python3.7(flask) in azure webapps. I deployed app.py and sleep_model.py that app.py uses from github. (app.py imports sleep_model.py, and sleep_model.py imports numpy.) Then I got this error on azure log stream: ”’ 2020-04-28T10:55:13.536802053Z File “/home/site/wwwroot/app.py”, line 15, in <module> 2020-04-28T10:55:13.536806954Z   import sleep_model 2020-04-28T10:55:13.536811454Z File “/home/site/wwwroot/sleep_model.py”, line 1, […]

Categories
Linux Mastering Development Ubuntu

Should I be using a different strategy than “SetEnv” for setting apache environment vars on 18.04?

I’m using Ubuntu 18.04, apache 2 and Python 3.6. In my Python project settings file, I have DATABASES = { ‘default’: { ‘ENGINE’: ‘django.db.backends.mysql’, ‘NAME’: os.environ[‘DB_NAME’], ‘USER’: os.environ[‘DB_USER’], ‘PASSWORD’: os.environ[‘DB_PASS’], ‘HOST’: os.environ[‘DB_SERVICE’], ‘PORT’: os.environ[‘DB_PORT’] } } In my Apache configuration file, /etc/apache2/sites-available/000-default.conf, I set up the envionrment variables like so <VirtualHost *:80> # The ServerName […]

Categories
Mastering Development

Heroku – can’t see application

i’ve created a basic app, using python and flask. i’ve deployed the app to heroku and heroku didn’t raise any exceptions or errrors. But when i open my app i getting message “application error”. app works well on my local host and pythonanywhere.com i’ve look for some solutions on web and stackoverflow as well. Didn’t […]