Articles tagged "python"

Page 5 of 13

4 min readBeginner

SOLVED: error: pg_config executable not found (psycopg2 pip install)

Fix "error: pg_config executable not found" when pip install psycopg2 fails. Install postgresql-dev headers or use psycopg2-binary instead.

8 min readIntermediate

Flask REST API Complete Guide 2026 — POST, abort, gunicorn, nginx

Build a Flask REST API in 2026. Covers POST endpoints, request.get_json(), flask.abort() with JSON, gunicorn workers, and nginx reverse proxy. Flask 3.x with examples.

6 min readBeginner

Most Common Python Errors and How to Fix Them (2026)

The most common Python errors in 2026 with fixes: ModuleNotFoundError, IndentationError, TypeError, AttributeError, NameError, and more. Direct solutions with code examples.

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.