[Solved] TypeError: in Python


Your configurationID is None. This likely means that generate_configurationID() is not returning a value. There is no way in Python for a variable name to “lose” its value. The only way, in the code you posted, for configurationID to be None is for generate_configurationID() to return None which is what will happen if you don’t explicitly return any value.

“But it prints the configurationID right on the screen!” you may object. Sure, but that’s probably in generate_configurationID() where you are printing it to make sure it’s right but forgetting to return it.

You may prove me wrong by posting generate_configurationID() in its entirety, and I will admit that your program is magic.

0

solved TypeError: in Python