}

Articles tagged "python"

Page 5 of 13

5 min readBeginner

Fix Python AttributeError: 'X' object has no attribute 'Y' (2026)

Fix Python AttributeError 'X' object has no attribute 'Y'. Covers None from functions, typos, missing self.attr in __init__, wrong types, module errors, hasattr and getattr.

4 min readBeginner

Fix Python IndentationError and TabError: Tabs vs Spaces (2026)

Fix Python IndentationError unexpected indent and TabError inconsistent use of tabs and spaces. Covers PEP 8, VS Code, vim retab, python -tt, and .editorconfig.

4 min readBeginner

Fix Python ModuleNotFoundError: No module named 'X' (2026)

Fix Python ModuleNotFoundError: No module named 'X'. Covers pip install, wrong Python version, venv not activated, sys.path debugging, and import name differences.

4 min readBeginner

Fix Python 'TypeError: X object is not subscriptable' (2026)

Fix Python TypeError 'NoneType' object is not subscriptable. Covers what subscriptable means, NoneType from None-returning functions, int/float errors, and isinstance checks.

22 min readBeginner

Flask API POST Request: Complete Guide to Handling POST Data

Learn how to handle POST requests in Flask. This tutorial covers receiving JSON, form data, file uploads, validation, building REST APIs, and advanced Domain-Driven Design (DDD) architecture patterns.

6 min readBeginner

Python Convert Int to String: 6 Methods with Examples

Learn how to convert an integer to a string in Python using str(), f-strings, format(), and more. Includes performance comparison and edge cases.

1 min readBeginner

Moviepy: example script with subtitles

In this short tutorial, we are to explain how to use moviepy to add subtitles to a video. We use CompositeVideoClip for adding the subtitles in the center position of the video. With this script you can add subtitles as a batch process to multiple videos.

1 min readBeginner

Mac OSX: OSError: MoviePy Error missing magick font

If you are trying to render font using moviepy you will need to install ghost script with brew install Ghostscript to have all the required fonts by moviepy. Check here for full details.

1 min readBeginner

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.

1 min readBeginner

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...