#259: 2 More Common Errors in MkDocs and How to Fix Them
Now that we have fixed the RSS feed, we can move on to two other common errors you may encounter. They are easy to fix, but first you need to know what the problem is.
Now that we have fixed the RSS feed, we can move on to two other common errors you may encounter. They are easy to fix, but first you need to know what the problem is.
The RSS feed plug-in for MkDocs is a bit of a troublemaker. While it works, there is a lot of room for improvement. One big disappointment is the handling of internal links. Unfortunately, the MkDocs pipeline is nothing you want to dive into and so I had to work around the problem.
Creating DTOs with NamedTuple was a nice way to create read-only structures to pass between functions. But not always is a read-only structure the right tool for the job. Let us look how we can create changeable structures like classes with ease.
Last week we explored our options to work with MP3 metadata. However, if you want to put your music on an iPhone, you most likely go for FLAC – the Free Lossless Audio Codec. Luckily for us, Mutagen can work with FLAC as well and it is even simpler than MP3.
The metadata in audio files help us to organise songs and allows tools like iTunes to show us the artist of the song it is playing. As long as the metadata is correct, everything works nicely. But what can we do if the data is wrong or not set at all? Let us explore our options and set some metadata.
While it is possible to fix the name of a column later in the plot, it is an additional step that takes time. It would be better if the data source already would have a correct name, but that is not always the case and often we cannot change that either. The remaining middle ground is to rename the column in the DataFrame - let us figure out how to do that.
The pivot method of Pandas is a great help to turn our DataFrame into a pivot table. But what can we do if we need to do the reverse and combine multiple columns into one column for a specific type?
When you are new to MkDocs you may find yourself in front of a few annoying problems. Before you turn your back on this tool, you should try the following troubleshooting tips.
Now that the posts for Python Friday are on the new PythonFriday.dev domain, I need a way to redirect the visitors from the Improve & Repeat blog to the new location. Let us write a script to create the necessary HTTP redirects.
What started as a series on my blog Improve & Repeat reached now the milestone of 250 posts. This is not only a point to celebrate, but also a good opportunity to move Python Friday to its own site. From now on you find all parts of the series on PythonFriday.dev. Please update your RSS reader and point it to this feed to stay up to date.
Here you can see the list of all previously released posts grouped by topic - I hope you enjoy it!