Solved_errors Index Page 1

Pygame blank screen with python3 and osx

Here is the solution when using pygame with OSX and you get a blank screen or not loading. You will need to uninstall and then install pygame from source code. In this article, we explain step by step how to fix pygame not loading in mac.

OSX Solution: No package 'gobject-introspection-1.0' found

The error: PKG_CONFIG_PATH environment variable No package 'glib-2.0' found, could be easy solved when using brew by settings the PKG_CONFIG_PATH to the following value: export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/Cellar/gobject-introspection/VERSION/lib/pkgconfig

OSX Solution: PKG_CONFIG_PATH environment variable No package 'glib-2.0' found

The error: PKG_CONFIG_PATH environment variable No package 'glib-2.0' found, could be easy solved when using brew by settings the PKG_CONFIG_PATH to the following value: export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/Cellar/glib/VERSION/lib/pkgconfig. Check this solution for more information

django rest framework: type object 'Token' has no attribute 'objects'

When you are using auth token with Django rest framework and you get the error type object 'Token' has no attribute 'objects', this means that didn't add the auth token in the settings' INSTALLED_APPS.

Django SOLUTION: TEST_DATABASE_PREFIX TypeError: can only concatenate str (not "NoneType") to str

In this article we explain how to fix the error "TypeError: can only concatenate str (not "NoneType") to str", when you execute unit tests. You need to specify sqlite database engine! check here for the full solution

tar xf error: Directory renamed before its status could be extracted

If you get th error Directory renamed before its status could be extracted when using tar, execute: apt install -y bsdtar && ln -sf $(which bsdtar) $(which tar)

OSX Catalina: ld: library not found for -lssl SOLUTION

When you compile something that requires ssl you need to set the export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/, check here for more details

Gitlab-CI Runner: sudo: no tty present and no askpass program specified

When you execute sudo on a gitlab-ci job you can get the folllowing error: "sudo: no tty present and no askpass program specified", the solution is to add gitlab-runner user in the sudoers file with NOPASSWD. Check this article for more information.

Python 3: ValueError: bad marshal data (unknown type code)

If you try to execute python project using python 2 and then switched to python 3, it's common to see the error ValueError: bad marshal data (unknown type code). Delete pycs recursively, check here for the command.

Raspberry pi and Python 3.7 : zipimport.ZipImportError: can't decompress data; zlib not available

Install the package zlib1g-dev using the command: sudo apt-get install zlib1g-dev to fix the error zipimport.ZipImportError: while installing python 3.7 from sources