Ovaar

Software Engineering blog


Read my latest blog posts

Azure pipelines - ctypes importerror

Fixing ctypes ImportError in Azure Pipelines: Missing _type_ Attribute When running pip install in an Azure Pipelines self-hosted agent, you might encounter the following error: File "~\myselfhostedagent\_work\_tool\Python\3.12.3\x64\Lib\site-packages\pip\_vendor\platformdirs\windows.py", line 254, in _pick_get_win_folder import ctypes # noqa: PLC0415 ^^^^^^^^^^^^^ File "ctypes\__init__.py", line 157, in <module> AttributeError: class must define a '_type_' attribute Interestingly, if you manually execute pip install using the same python.exe, it works fine. However, when executed within the Azure Pipelines agent, it fails.

published on Fri, 31 Jan 2025

Deploying a Blog with GitHub Actions, Docker, and Submodules

๐Ÿš€ Deploying a Blog with GitHub Actions, Docker, and Submodules ๐Ÿ“Œ Problem Statement If youโ€™re using GitHub Actions to build and deploy a static blog that: Runs inside Docker Pushes generated content to a GitHub Pages submodule Requires Git authentication to commit and push changes Then, you might run into permission issues, especially when pushing to submodules. This guide walks you through setting up GitHub Actions to automatically deploy your blog without permission errors.

published on Fri, 31 Jan 2025

Azure pipelines cross-platform python scripting

Azure pipelines cross-platform python scripting This post is a continuation of Azure pipelines cross-platform scripts for Self-Hosted Azure agents. If you’ve missed it make sure to read this first, since we’re going to extend on it. I can hear you think, “but Python is already cross platform … ?”. Yes, though this is going to be about how to setup Azure Pipelines to invoke Python in a cross-platform way. The problem The problem that you’re going to face is that not all Python installations have the same executables python and python3.

published on Thu, 01 Aug 2024