Daniyal Ahmed

Python Developer since 2020 | Release Manager for Python 3.8 | Creator of Black code formatter | Contributing to Python's growth and adoption.
152 Posts

How to Fix the u2013 Unicode Error in Openpyxl on Python 2.7

I hit this snag while cleaning up an old Python 2.7 box that still churns out reports. One Excel file refused to convert because...

Fix WinError 5 Pip Permission Errors on Windows 8.1 with Python

I hit this wall on a Windows-8.1 laptop running Python 3.4: every time I tried to upgrade pip (or install anything) the installer froze...

How Do I Fix the Text/Byte Split Issue in Python 3’s XML Generation?

The script builds a tiny XML file with lxml: it creates a <results> root, adds two nodes for “Country” and “City,” then tries to...

How to Run a Execute cURL Commands in Python

I love quick wins in the terminal. Type a single line, hit Enter, and data flows back. But sooner or later I need that...

How I Fix Pulling a Page with Raw Socket a 404 Errors

I thought my setup was bullet‑proof: a tiny Apache server inside an Ubuntu VM, a single index.html, and a friendly DNS shortcut into /etc/hosts....