Debugging Common Coding Error Messages

Uniqtech
Learn to Code Co
Published in
4 min readJun 4, 2021

--

Here’s a short effective list of common coding error messages. Consider it a cheat sheet for beginners. As frustrating as some of these lengthy stack trace messages are, it’s important to read the key messages throughly word for word. They are meant to be helpful, not 🎃

Getting started with exception handling with this beginner friendly article.

Need to contact us, or get started with more smart tutorials?

Visit us : Messenger https://ml.learn-to-code.co/message3.html

Log in to view smart contents

May 2021 smart tutorial: Non-fungible Tokens NFTs explained https://ml.learn-to-code.co/path3.html?tutorial=p_smart_tutorial_NFT_explained

Smart tutorial — an overview of Machine Learning Tools:

KeyError

This error happens when a key request does not return a value, or the key does not exist in a dictionary in Python or a hash map in other languages. It is possible to set a default value to return to avoid this message. Python dictionary can return default value if key not found.

>>> my_dict = dict()
>>> key = "fake_key"
>>> my_dict.get(key,"empty")
--> "empty"

--

--