Category Archives: Programming
Controlling fan speed with Gigabyte 970A-D3P
TL;DR; I plugged the fan hub into the CPU fan socket and plugged the CPU fan into the SYS_FAN1 socket. Then it worked. This is an old board so you’re gonna be wasting a lot of time. The SYS_FAN1 Th 970A-D3P has 4 pin on the CPU_Fan and Sys Fan 1 so it does support… Read More »
Displaying data with dynamic accordion
If you want to have an accordion feature to show extra data where you are displaying data from a database on an existing row, you need create set some extra attributes on the first row. One important attribute is data-target which needs to contain a dynamic value such as This then points to the second… Read More »
Thumbnail bug in python simple gallery
Python simple gallery is pretty neat but there is an issue when generating thumbnails if your photos are named a certain way. The filename is split at the first dot and then .jpg is added to the file name. My photos are named: 2023-09-24 19.00.43.jpg which means everything after the hour is truncated. ie the… Read More »
module ‘PIL.Image’ has no attribute ‘ANTIALIAS’
If you see the error and you are trying to use Simple Photo Gallery, try running: This is because there is a library dependency. For more details: https://stackoverflow.com/questions/76616042/attributeerror-module-pil-image-has-no-attribute-antialias
How to add sorting to an HTML table?
A really neat extension to make your HTML tables dynamic and interactive. https://datatables.net/examples/index An example of how to use it can be found here:
How to add authentication to your Django website?
This video series is by far the best on how to learn to set up authentication on your Django website.
django Incomplete response received from application
This error was driving me crazy. There were no logs that I could find and the html was just <h1>Incomplete Response Received from Application</h1> My localhost was working fine though. The reason was that I was using a library that I had not yet installed! I was using “import requests” but this was not on… Read More »
ModuleNotFoundError: No module named ‘tweepy’
To fix a python error such as “ModuleNotFoundError: No module named ‘tweepy’”, you should check your version of python with: Often you will have one version installed but trying to execute the script with another version where the module is not installed. Check your python version in your path with: For me, my path specific… Read More »
cannot import name ‘Error’ from ‘mysql.connector’
To solve the error below: I needed to install mysql_connector via: I had already installed mysql via: But python needs both.