Tuesday, July 12, 2022
HomeCyber SecurityTypeError: can't unpack non-iterable operate object | by Teri Radichel | Bugs...

TypeError: can’t unpack non-iterable operate object | by Teri Radichel | Bugs That Chunk | Jul, 2022


Examine for nulls, empty strings, and proper sorts

In a later weblog put up I could clarify how I added sort checking to Python, however this error message which isn’t precisely exact is attributable to a lacking worth in my case.

I’m writing a parser that reads directions from a file. When it hits an instruction it parses out the motion to take and associated attributes that point out what knowledge the motion ought to act upon.

In my configuration, I mistyped the attributes for my motion. That brought about a worth of None to be handed in the place a operate anticipated a unique sort to be handed into it.

Added sort checking to the values I used to be passing into the operate previous to taking the motion and acquired an error that one among my handed in values was incorrect.

I’m undecided what iterable has to do with it for the reason that lacking worth was a string. Iterable means one thing you possibly can loop by means of. At any price, I fastened the configuration to appropriately cross within the lacking worth and resolved the error.

Teri Radichel

When you preferred this story please clap and comply with:

Medium: Teri Radichel or E-mail Checklist: Teri Radichel
Twitter: @teriradichel or @2ndSightLab
Requests providers by way of LinkedIn: Teri Radichel or IANS Analysis

© 2nd Sight Lab 2022

____________________________________________

Writer:

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 Assets 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