Tuesday, July 12, 2022
HomeCyber SecurityTypeError: unhashable kind: ‘checklist’ | by Teri Radichel | Bugs That Chunk...

TypeError: unhashable kind: ‘checklist’ | by Teri Radichel | Bugs That Chunk | Jul, 2022


To bracket or to not bracket

I’m certain within the underlying implementation this error might have some that means, however from my consumer perspective this message could be very unclear. As a result of I do know what the syntax is meant to be it was simple to identify. For somebody unfamiliar with or new to the ideas it’s a message with little or no that means.

In my case I used to be trying to iterate via some JSON components. I used to be passing a variable right into a perform that contained the ingredient title:

def funkyfunc(element_variable)

I used to be additionally working with some lists which reference components in brackets.

checklist=["alpha", "beta"]

Within the midst of my context-switching I inadvertently put brackets round my variable for some inexplicable purpose:

for [element_variable] in json_data:

Eradicating the brackets solves this specific drawback:

for element_variable in json_data:

Teri Radichel

In the event you preferred this story please clap and observe:

Medium: Teri Radichel or Electronic mail Listing: Teri Radichel
Twitter: @teriradichel or @2ndSightLab
Requests companies by way of LinkedIn: Teri Radichel or IANS Analysis

© 2nd Sight Lab 2022

____________________________________________

Creator:

Cybersecurity for Executives within the Age of Cloud on Amazon

Want Cloud Safety Coaching? 2nd Sight Lab Cloud Safety Coaching

Is your cloud safe? Rent 2nd Sight Lab for a penetration take a look at or safety evaluation.

Have a Cybersecurity or Cloud Safety Query? Ask Teri Radichel by scheduling a name with IANS Analysis.

Cybersecurity & Cloud Safety Sources by Teri Radichel: Cybersecurity and Cloud safety courses, articles, white papers, displays, and podcasts



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments