post

The error in your way: a beginner’s guide to troubleshooting command error messages

by Adele Gonsalvez

As a bioinformatic newbie, there is a lot to wrap your head around – from understanding basic programming language to what commands you need to use. In my experience, one particular gem is when you are trying to run a command and you receive one in a series of often uninformative error messages. Troubleshooting will end up dominating your time when you are doing any kind of coding, and it can be incredibly frustrating. So, instead of swearing at your computer (although that can be therapeutic at times), here’s some handy tips I’ve picked up that can be more effective in addressing that pesky error message.

It may seem like a minor issue, but in my experience most command errors come from typos, and they can be tricky to spot. Step through your command or script to ensure there aren’t any spelling mistakes or extra spaces at the end of commands. Also ensure file paths are correct, and input files exist and are correctly named.

ChatGPT is an incredibly useful tool for troubleshooting both error messages and general command generation. Specifying the error code, ChatGPT can outline the various causes for that error message and suggests how to go about addressing the issue.

Leave it for a couple hours. The human version of “Did you try turning it off and on again?”. Like any form of editing, if you have been staring at the same bit of text for too long, it is easy to gloss over misspelt words or extra spaces. Revisiting it later can help you find issues that you previously overlooked.

Ask your co-workers to look over your command or script. It’s likely that some of them will be more experienced in bioinformatics and can shed some light on what’s going wrong. Even if none of your coworkers are familiar with coding, a fresh set of eyes can often spot little mistakes much better than your own. I once spent hours trying to solve an error in a script, which only took for my friend 30 seconds to solve (it was an extra space at the end of a command).

Adele Gonsalvez (2022 Honours Student) is investigating the expression and the antimicrobial activity of defensins from the platypus and short-beaked echidna