<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mats Lindh</title>
	<atom:link href="https://e-mats.org/feed/" rel="self" type="application/rss+xml" />
	<link>https://e-mats.org</link>
	<description>Where desperate is just another word for a regular day.</description>
	<lastBuildDate>Mon, 30 Mar 2026 12:49:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Only applying WTForms validations if another field has a specific value</title>
		<link>https://e-mats.org/2026/03/only-applying-wtforms-validations-if-another-field-has-a-specific-value/</link>
					<comments>https://e-mats.org/2026/03/only-applying-wtforms-validations-if-another-field-has-a-specific-value/#respond</comments>
		
		<dc:creator><![CDATA[Mats]]></dc:creator>
		<pubDate>Mon, 30 Mar 2026 12:49:15 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://e-mats.org/?p=1322</guid>

					<description><![CDATA[When you have a WTForms field that have a radio button that can change between different field types, you might want to only apply certain validators if the field has a specific value (for example to swap between types of users, types of cars, etc.). This is a custom validator that stops validation if a &#8230; <a href="https://e-mats.org/2026/03/only-applying-wtforms-validations-if-another-field-has-a-specific-value/" class="more-link">Continue reading <span class="screen-reader-text">Only applying WTForms validations if another field has a specific value</span></a>]]></description>
										<content:encoded><![CDATA[
<p>When you have a WTForms field that have a radio button that can change between different field types, you might want to only apply certain validators if the field has a specific value (for example to swap between types of users, types of cars, etc.).</p>



<p>This is a custom validator that stops validation if a specific field doesn&#8217;t have the assumed value &#8211; and can also require the field to be present (so that the field can&#8217;t just be left empty even if the other field is present).</p>



<pre class="wp-block-code"><code>def validator_required_if(other_field_name, other_value, is_required: bool = False):
    def _validator(form, field):
        other_field = form&#91;other_field_name]

        if other_field.data == other_value:
            if not field.data or (isinstance(field.data, str) and not field.data.strip()):
                raise StopValidation(f'This field is required when {other_field.label.text} is "{other_value}"')
        else:
            field.data = None

            if not is_required:
                field.errors&#91;:] = &#91;]

            raise StopValidation()

    return _validator</code></pre>



<p>Usage of the validator in a WTForms field:</p>



<pre class="wp-block-code"><code># 'type' is a different field on the same form.
# 'label' is the value 'type' should have to apply the following validators
text = StringField(_l('Label'), validators=&#91;validator_required_if('type', 'label'), InputRequired()])</code></pre>



<p>The example verifies that the field <code>text</code> has input present <em>if</em> the field <code>type</code> is set to <code>label</code>. If the field <code>type</code> is set to <code>label</code> but <code>text</code> isn&#8217;t present, an error will be thrown.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://e-mats.org/2026/03/only-applying-wtforms-validations-if-another-field-has-a-specific-value/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Checking out a private submodule in a GitHub Action pipeline with a limited deploy key</title>
		<link>https://e-mats.org/2026/02/checking-out-a-private-submodule-in-a-github-action-pipeline-with-a-limited-deploy-key/</link>
					<comments>https://e-mats.org/2026/02/checking-out-a-private-submodule-in-a-github-action-pipeline-with-a-limited-deploy-key/#respond</comments>
		
		<dc:creator><![CDATA[Mats]]></dc:creator>
		<pubDate>Mon, 16 Feb 2026 13:27:42 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://e-mats.org/?p=1319</guid>

					<description><![CDATA[I prefer to have any authentication identifiers be as narrow as possible when they&#8217;re defined in a pipeline or similar, and this proved to be a challenge when it comes to private git submodules inside a GitHub Action pipeline. A common way to solve this is by defining a personal access token (a PAT), but &#8230; <a href="https://e-mats.org/2026/02/checking-out-a-private-submodule-in-a-github-action-pipeline-with-a-limited-deploy-key/" class="more-link">Continue reading <span class="screen-reader-text">Checking out a private submodule in a GitHub Action pipeline with a limited deploy key</span></a>]]></description>
										<content:encoded><![CDATA[
<p>I prefer to have any authentication identifiers be as narrow as possible when they&#8217;re defined in a pipeline or similar, and this proved to be a challenge when it comes to private git submodules inside a GitHub Action pipeline.</p>



<p>A common way to solve this is by defining a personal access token (a PAT), but this has a severe limitation: it needs access to both the project you&#8217;re deploying and the external submodule. But why does that matter? Because it means that you can&#8217;t configure the PAT under an organisation and re-use it across all your projects without making the PAT have access to all the repositories as well. </p>



<p>You effectively end up with a super-PAT that isn&#8217;t limited to just deploying the submodule.</p>



<p>Instead, you have to do it rather manually and as a two-step process. First, check out your project as you&#8217;d usually do with the checkout action, and then do the manual dance of configuring ssh with your deploy key and fetch submodules explicitly with git.</p>



<p>You&#8217;ll end up with something resembling these two workflow steps (based on a few posts on Stack Overflow and suggestions from a few LLMs):</p>



<pre class="wp-block-code"><code>      - name: Checkout and setup
        uses: actions/checkout@v6.0.1
        with:
          submodules: false
      - run: |
          mkdir -p ~/.ssh
          touch ~/.ssh/id_deploy_key
          chmod 0600 ~/.ssh/id_deploy_key
          echo '${{ secrets.LIBRARY_DEPLOY_PRIVATE_KEY }}' > ~/.ssh/id_deploy_key
          GIT_SSH_COMMAND="ssh -i ~/.ssh/id_deploy_key" git submodule update --init --recursive
        shell: bash</code></pre>



<p>This is slightly verbose, but it works nicely in practice. Stick the deploy key in an organization secret under the name LIBRARY_DEPLOY_PRIVATE_KEY, and it&#8217;ll be available to any workflow that needs access to your private submodule.</p>



<p>And if it leaks &#8211; it just affects your common library, which shouldn&#8217;t contain any valuable secrets (.. outside of your code, at least) and your generic library code.</p>



<p>The best way would be that actions itself supported providing a deploy key for a given submodule, but it doesn&#8217;t seem like GitHub wants to support that from the tickets I read while researching this.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://e-mats.org/2026/02/checking-out-a-private-submodule-in-a-github-action-pipeline-with-a-limited-deploy-key/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>django: initial or submitted values in manual Form rendering</title>
		<link>https://e-mats.org/2025/11/django-initial-or-submitted-values-in-manual-form-rendering/</link>
					<comments>https://e-mats.org/2025/11/django-initial-or-submitted-values-in-manual-form-rendering/#respond</comments>
		
		<dc:creator><![CDATA[Mats]]></dc:creator>
		<pubDate>Mon, 03 Nov 2025 13:57:30 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://e-mats.org/?p=1316</guid>

					<description><![CDATA[After defining a form with initial values, we want the values to be shown to the user &#8211; but we don&#8217;t want to use Django&#8217;s built-in form rendering (.. for various reasons) &#8211; when using django templates. So if no data has been submitted, we want to get the initial value defined for the form &#8230; <a href="https://e-mats.org/2025/11/django-initial-or-submitted-values-in-manual-form-rendering/" class="more-link">Continue reading <span class="screen-reader-text">django: initial or submitted values in manual Form rendering</span></a>]]></description>
										<content:encoded><![CDATA[
<p>After defining a form with initial values, we want the values to be shown to the user &#8211; but we don&#8217;t want to use Django&#8217;s built-in form rendering (.. for various reasons) &#8211; when using django templates.</p>



<p>So if no data has been submitted, we want to get the initial value defined for the form to show to the user, but if data has been submitted, we want to show the value submitted instead.</p>



<p>The first iteration was something like this:</p>



<pre class="wp-block-code"><code>ExportForm(self.request.GET, initial={
    'start_datetime': utcnow(),
    'end_datetime': utcnow(),
})
</code></pre>



<p>Since <code>request.GET</code> is empty, the initial value should be used instead. And if we use <code>{{ form.start_datetime.initial }}</code> everything looks fine. But if we use <code>.value</code> instead of <code>.initial</code> to get the resolved value for the field (the submitted <em>or</em> the initial value), we only get <code>None </code>back.</p>



<p>The problem occurs because we&#8217;ve actually bound the form &#8211; if the form is unbound, we get the initial value back when calling <code>{{ form.start_datetime.value }}</code>, but since the form has been initialized with a dictionary (<code>self.request.GET</code>), the form is now considered bound, even if <code>self.request.GET</code> is empty (i.e. no parameters has been provided through the URL &#8211; the state before a request is made).</p>



<p>The answer is to massage the form slightly on creation instead:</p>



<pre class="wp-block-code"><code>ExportForm(self.request.GET or None, initial={
    'start_datetime': utcnow(),
    'end_datetime': utcnow(),
})</code></pre>



<p>The <code>or None</code> part means that if the GET request is empty, we send in <code>None</code> instead, meaning that the form won&#8217;t be considered bound. This way we can use <code>{{ form.start_datetime.value }}</code> in our form, and actually get either the submitted value or the initial value back.</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://e-mats.org/2025/11/django-initial-or-submitted-values-in-manual-form-rendering/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Regenerate session ids in a flask server side session</title>
		<link>https://e-mats.org/2025/07/regenerate-session-ids-in-a-flask-server-side-session/</link>
					<comments>https://e-mats.org/2025/07/regenerate-session-ids-in-a-flask-server-side-session/#respond</comments>
		
		<dc:creator><![CDATA[Mats]]></dc:creator>
		<pubDate>Thu, 24 Jul 2025 23:08:59 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flask]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://e-mats.org/?p=1313</guid>

					<description><![CDATA[To avoid an attack known as a &#8220;session fixation attack&#8221;, where the attacker is able to force your web application to use a specific session id, you&#8217;re supposed to be the good guy and regenerate the session id when a user logs in or register (or if you really want to, on every request to &#8230; <a href="https://e-mats.org/2025/07/regenerate-session-ids-in-a-flask-server-side-session/" class="more-link">Continue reading <span class="screen-reader-text">Regenerate session ids in a flask server side session</span></a>]]></description>
										<content:encoded><![CDATA[
<p>To avoid an attack known as a &#8220;session fixation attack&#8221;, where the attacker is able to force your web application to use a specific session id, you&#8217;re supposed to be the good guy and regenerate the session id when a user logs in or register (or if you really want to, on every request to have a fleeting session id &#8211; but this will also require extra traffic towards your session backend, even if the server side content of the session itself doesn&#8217;t change).</p>



<p>Flask-Session supports this through their <code>regenerate</code> function, which you can call on the defined <code>session </code>interface (either through <code>app.session_interface</code> or, in a blueprint, through <code>current_app.session_interface</code>).</p>



<p>Some language models (regardless of them qualifying themselves as either large or small) are going to say &#8220;just use <code>session.clear()</code> and the session token will be regenerated&#8221;, but they&#8217;ll be wrong (at least for Flask 3.1).</p>



<p>So you try to do it yourself &#8211; you log out of your account, and then sign in again, and by calling <code>regenerate()</code> in your sign in function, you expect the session token to be regenerated from whatever it previously was.</p>



<p>But that doesn&#8217;t happen.</p>



<p>Your code would look like (in a blueprint):</p>



<pre class="wp-block-code"><code>session.clear()
current_app.session_interface.regenerate(session)

session&#91;'user_id'] = user.id

return redirect(url_for('index'))</code></pre>



<p>.. but nothing changes. Well, it turns out that Flask-Session guards it regenerate() function with a check for a true-ish value, instead of checking if there&#8217;s a valid session given:</p>



<pre class="wp-block-code"><code>def regenerate(self, session: ServerSideSession) -> None:
    """Regenerate the session id for the given session. Can be used by calling ``flask.session_interface.regenerate()``."""
    if session:
        # Remove the old session from storage
        self._delete_session(self._get_store_id(session.sid))
        # Generate a new session ID
        new_sid = self._generate_sid(self.sid_length)
        session.sid = new_sid
        # Mark the session as modified to ensure it gets saved
        session.modified = True</code></pre>



<p>And this is where the issue happens &#8211; since you&#8217;ve done what you should be doing &#8211; clearing the session, not trusting whatever might be there; you&#8217;re left with an empty session dictionary, which will evaluate to a false-y value, and not a true-ish value &#8211; so since the session is empty, the code will never run.</p>



<p>The answer is to ask Flask-Session nicely to regenerate the session id <em>after</em> you&#8217;ve populated with the user&#8217;s information:</p>



<pre class="wp-block-code"><code>session.clear()<br>session&#91;'user_id'] = user.id<br>current_app.session_interface.regenerate(session)</code></pre>



<p>That way the Flask-Session will be happy with you, since you now have a session that will be seen as true-ish instead, and the world will rejoice.</p>



<p>And that, my friends, was what made me write another post here to document something weird after eight years of hiatus.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://e-mats.org/2025/07/regenerate-session-ids-in-a-flask-server-side-session/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Imagemagick / MagickWand under alpine linux / python-alpine</title>
		<link>https://e-mats.org/2017/04/imagemagick-magickwand-under-alphine-linux-python-alpine/</link>
					<comments>https://e-mats.org/2017/04/imagemagick-magickwand-under-alphine-linux-python-alpine/#comments</comments>
		
		<dc:creator><![CDATA[Mats]]></dc:creator>
		<pubDate>Tue, 18 Apr 2017 11:15:34 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://e-mats.org/?p=1270</guid>

					<description><![CDATA[The python implemention of MagickWand, aptly named Wand, requires ImageMagick and MagickWand installed. While building docker images using the python:alpine base images, these dependencies can be installed through: ENV MAGICK_HOME=/usr RUN apk add --no-cache imagemagick &#038;& \ apk add --no-cache imagemagick-dev The first one is required for Wand to find the installed MagickWand libraries, while &#8230; <a href="https://e-mats.org/2017/04/imagemagick-magickwand-under-alphine-linux-python-alpine/" class="more-link">Continue reading <span class="screen-reader-text">Imagemagick / MagickWand under alpine linux / python-alpine</span></a>]]></description>
										<content:encoded><![CDATA[<p>The python implemention of MagickWand, aptly named Wand, requires ImageMagick and MagickWand installed. While building docker images using the python:alpine base images, these dependencies can be installed through:</p>
<p><code>ENV MAGICK_HOME=/usr<br />
RUN apk add --no-cache imagemagick && \<br />
    apk add --no-cache imagemagick-dev</code></p>
<p>The first one is required for Wand to find the installed MagickWand libraries, while the second installs the imagickmagick development dependencies (and thus, the magickwand shared library).</p>
]]></content:encoded>
					
					<wfw:commentRss>https://e-mats.org/2017/04/imagemagick-magickwand-under-alphine-linux-python-alpine/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>cmd.exe &#8211; program has stopped working &#8211; but it works in Windows Explorer?</title>
		<link>https://e-mats.org/2017/04/cmd-exe-program-has-stopped-working-but-it-works-in-windows-explorer/</link>
					<comments>https://e-mats.org/2017/04/cmd-exe-program-has-stopped-working-but-it-works-in-windows-explorer/#respond</comments>
		
		<dc:creator><![CDATA[Mats]]></dc:creator>
		<pubDate>Mon, 17 Apr 2017 15:01:24 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://e-mats.org/?p=1268</guid>

					<description><![CDATA[After digging through this issue for _at least_ four hours today, I&#8217;ve revisited an issue that crept up 1,5 years ago. This time I found out that it actually happened to most 32-bit programs launched under cmd. Since the Android SDK&#8217;s utilities are compiled in 32-bit mode by default, this time I had to actually &#8230; <a href="https://e-mats.org/2017/04/cmd-exe-program-has-stopped-working-but-it-works-in-windows-explorer/" class="more-link">Continue reading <span class="screen-reader-text">cmd.exe &#8211; program has stopped working &#8211; but it works in Windows Explorer?</span></a>]]></description>
										<content:encoded><![CDATA[<p>After digging through this issue for _at least_ four hours today, I&#8217;ve <a href="http://e-mats.org/2016/01/python-exe-has-stopped-working-suddenly-appeared-under-windows-10/">revisited an issue that crept up 1,5 years ago</a>. This time I found out that it actually happened to most 32-bit programs launched under cmd. Since the Android SDK&#8217;s utilities are compiled in 32-bit mode by default, this time I had to actually find out what was causing the issue.</p>
<p>Turns out it was ansicon.exe. After starting the 32-bit cmd.exe from windows\SysWOW64 and stuff worked &#8211; I discovered I got an error about ansicon.exe not being able to load. Removing ansicon.exe completely solved the problem. I&#8217;m .. stunned.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://e-mats.org/2017/04/cmd-exe-program-has-stopped-working-but-it-works-in-windows-explorer/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>bkool pro trainer fails firmware update</title>
		<link>https://e-mats.org/2016/11/bkool-pro-trainer-fails-firmware-update/</link>
					<comments>https://e-mats.org/2016/11/bkool-pro-trainer-fails-firmware-update/#respond</comments>
		
		<dc:creator><![CDATA[Mats]]></dc:creator>
		<pubDate>Wed, 02 Nov 2016 19:22:19 +0000</pubDate>
				<category><![CDATA[Biking]]></category>
		<category><![CDATA[bkool]]></category>
		<category><![CDATA[cycling]]></category>
		<category><![CDATA[indoors]]></category>
		<category><![CDATA[smart trainers]]></category>
		<guid isPermaLink="false">http://e-mats.org/?p=1258</guid>

					<description><![CDATA[After trying to get my bkool pro smart trainer to update to the most recent version for almost two weeks, I finally solved the issue tonight. The official FAQ just states that you should stop anything related to bluetooth and that the ANT+ dongle should be right at the base of the trainer. I had &#8230; <a href="https://e-mats.org/2016/11/bkool-pro-trainer-fails-firmware-update/" class="more-link">Continue reading <span class="screen-reader-text">bkool pro trainer fails firmware update</span></a>]]></description>
										<content:encoded><![CDATA[<p>After trying to get my bkool pro smart trainer to update to the most recent version for almost two weeks, I finally solved the issue tonight. The official FAQ just states that you should stop anything related to bluetooth and that the ANT+ dongle should be right at the base of the trainer. I had done both things &#8211; even stopping any Garmin related products installed, but nothing helped. The firmware update would start, but after a couple of minutes (or a many as ten), bkool indoor would error out.</p>
<p>The solution: A new USB controller card. Apparently the USB ports on the motherboard introduced too much noise on the connection, and since ANT+ (or bkool, not sure) doesn&#8217;t have any proper error correction to detect errors on a smaller level and resend USB packages, it seems there was an error introduced somewhere in the firmware update, and the end checksum failed.</p>
<p>A new VIA-based USB PCI-card from Ebay solved the issue, and now my firmware is upgraded! Yay! (the trainer worked just fine except for that, so it was still usable &#8211; but I had a bug appear that the firmware should fix (or maybe that was caused by noise on the USB bus as well? We&#8217;ll see. Zwifting away in a couple of days)!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://e-mats.org/2016/11/bkool-pro-trainer-fails-firmware-update/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Facebook Graph API: (#324) Missing or invalid image file</title>
		<link>https://e-mats.org/2016/06/facebook-graph-api-324-missing-or-invalid-image-file/</link>
					<comments>https://e-mats.org/2016/06/facebook-graph-api-324-missing-or-invalid-image-file/#respond</comments>
		
		<dc:creator><![CDATA[Mats]]></dc:creator>
		<pubDate>Mon, 13 Jun 2016 21:01:10 +0000</pubDate>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[graph api]]></category>
		<category><![CDATA[graphapi]]></category>
		<guid isPermaLink="false">http://e-mats.org/?p=1251</guid>

					<description><![CDATA[If you keep getting errors when trying to set a custom page tab icon when adding an app to a page &#8211; make sure that the application is actually published. You can add it &#8211; and the icon will change, but will still generate an error &#8211; if the application isn&#8217;t published yet. No idea &#8230; <a href="https://e-mats.org/2016/06/facebook-graph-api-324-missing-or-invalid-image-file/" class="more-link">Continue reading <span class="screen-reader-text">Facebook Graph API: (#324) Missing or invalid image file</span></a>]]></description>
										<content:encoded><![CDATA[<p>If you keep getting errors when trying to set a custom page tab icon when adding an app to a page &#8211; make sure that the application is actually published. You can add it &#8211; and the icon will change, but will still generate an error &#8211; if the application isn&#8217;t published yet. No idea why it&#8217;d give an error like that, but hey.</p>
<p>There&#8217;s quite a few other reasons for the error as well, but Google have probably already told you about those.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://e-mats.org/2016/06/facebook-graph-api-324-missing-or-invalid-image-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Old Ubuntu-releases in APT / etc.</title>
		<link>https://e-mats.org/2016/05/old-ubuntu-releases-in-apt-etc/</link>
					<comments>https://e-mats.org/2016/05/old-ubuntu-releases-in-apt-etc/#respond</comments>
		
		<dc:creator><![CDATA[Mats]]></dc:creator>
		<pubDate>Wed, 25 May 2016 10:14:29 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[sources.list]]></category>
		<guid isPermaLink="false">http://e-mats.org/?p=1247</guid>

					<description><![CDATA[We have an old VM (Ubuntu 14.10) that we just have running &#8211; it does a very specific job, isn&#8217;t connected to anything important and just shugs along. But because of a dependency issue with external software, we needed to install a new library to it &#8211; and because of dependencies when we first set &#8230; <a href="https://e-mats.org/2016/05/old-ubuntu-releases-in-apt-etc/" class="more-link">Continue reading <span class="screen-reader-text">Old Ubuntu-releases in APT / etc.</span></a>]]></description>
										<content:encoded><![CDATA[<p>We have an old VM (Ubuntu 14.10) that we just have running &#8211; it does a very specific job, isn&#8217;t connected to anything important and just shugs along. But because of a dependency issue with external software, we needed to install a new library to it &#8211; and because of dependencies when we first set up the VM, Ubuntu was the distro selected.</p>
<p>Sadly all the old URLs for apt-get in sources.list had stopped working, as the mirrors no longer had that specific Ubuntu (utopic) version available.</p>
<p>Luckily &#8211; after a bit of using our old friend Google &#8211; I found <code>old-releases.ubuntu.com</code>. This is also available as an archive for content through APT, so if you prefix your old addresses with <code>old-releases.ubuntu.com</code> instead of whatever mirror you&#8217;re used to fetching images from, you can get last version of the packages made available when you first set up your distro.</p>
<p>Saved the day!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://e-mats.org/2016/05/old-ubuntu-releases-in-apt-etc/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>&#8220;python.exe has stopped working&#8221; suddenly appeared under Windows 10</title>
		<link>https://e-mats.org/2016/01/python-exe-has-stopped-working-suddenly-appeared-under-windows-10/</link>
					<comments>https://e-mats.org/2016/01/python-exe-has-stopped-working-suddenly-appeared-under-windows-10/#comments</comments>
		
		<dc:creator><![CDATA[Mats]]></dc:creator>
		<pubDate>Mon, 25 Jan 2016 22:30:21 +0000</pubDate>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[python3]]></category>
		<category><![CDATA[python35]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[windows 10]]></category>
		<guid isPermaLink="false">http://e-mats.org/?p=1233</guid>

					<description><![CDATA[When attempting to start python tonight, Windows 10 suddenly produced the &#8220;python.exe has stopped working&#8221; error. Examining the event in the Event Viewer didn&#8217;t provide any more useful information, but surprisingly everything worked if I launched python.exe directly from Explorer &#8211; or through bash (cygwin), but not if I launched it through the regular command &#8230; <a href="https://e-mats.org/2016/01/python-exe-has-stopped-working-suddenly-appeared-under-windows-10/" class="more-link">Continue reading <span class="screen-reader-text">&#8220;python.exe has stopped working&#8221; suddenly appeared under Windows 10</span></a>]]></description>
										<content:encoded><![CDATA[<p>When attempting to start python tonight, Windows 10 suddenly produced the &#8220;python.exe has stopped working&#8221; error. Examining the event in the Event Viewer didn&#8217;t provide any more useful information, but surprisingly everything worked if I launched python.exe directly from Explorer &#8211; or through bash (cygwin), but not if I launched it through the regular command line (cmd.exe).</p>
<p>What solved it? Removing the old directory again (even after trying a fresh install) and then explicitly finding the 64-bit version from the python download page (it gives you the 32-bit version by default, it seems). Reinstalling with the new archive fixed everything, and now it works again (and I checked &#8220;pre-compile the standard library, but that shouldn&#8217;t change anything)! Woho! Now to just reinstall quite a few virtualenvs..</p>
]]></content:encoded>
					
					<wfw:commentRss>https://e-mats.org/2016/01/python-exe-has-stopped-working-suddenly-appeared-under-windows-10/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
