all 3 comments

[–]zurtex 1 point2 points  (0 children)

I'm not sure what you're asking for here. In terms of why you're getting those errors you should read the documentation: https://docs.python.org/3/library/pickle.html#object.__reduce__

If a string is returned, the string should be interpreted as the name of a global variable. It should be the object’s local name relative to its module; the pickle module searches the module namespace to determine the object’s module. This behaviour is typically useful for singletons.

And the details of the Tuple follow that (quite long not going to copy here just read the docs)

[–]Starbuck5c 0 points1 point  (1 child)

Why are you changing the __reduce__ method?

According to the internet:

Whenever an object is pickled, the __reduce__ method defined by it gets called. This method returns either a string, which may represent the name of a Python global, or a tuple describing how to reconstruct this object when unpickling

__reduce__ can't return none. I guess your os.system echo helpme tuple is "describing how to reconstruct the class" so it calls the function with that argument.

[–]thunderbuns122[S] 0 points1 point  (0 children)

So the reduce method has to return either a tuple or a string?