“KeyError: ‘GOOGLE_APPLICATION_CREDENTIALS‘” It was way too early in the morning for this error. See if you can spot the problem. I hadn’t had my coffee before trying to debug the code I’d written the night before, so it will probably take you less time than it did me. app.py: file_handling.py: See the problem? This was… Continue reading Adventures in Import-land, Part II
Articles on imports
Stuck in import hell? Walk your way out.
By Russell Helmstedter on 22 February 2024
Welcome to Hell Cue the theme song from The Fresh Prince of Bel Air. This is a story that turns out well. But my code got stuck in import hell. I tried to teach my students all about pytest. Instead, for two days, I was sent on a debugging quest. I teach middle school students… Continue reading Stuck in import hell? Walk your way out.
⚠️Why you should avoid import * in Python 🐍
By Bob Belderbos on 15 August 2023
Anyone who’s worked with Python knows that modules can be a Godsend, saving you time, effort, and many lines of code. They even have namespacing built-in 💪 😍 To expand on this a bit: However, not all ways of using modules are equally beneficial. In this article, we will discuss why using import * can… Continue reading ⚠️Why you should avoid import * in Python 🐍
From Script to Project – Packaging Your Code in Python
By Bob Belderbos on 1 July 2017
This week’s article is about packaging your Python code. Sounds daunting? Actually it is pretty simple.