Issue 7688: TypeError: name must be set to a string object (original) (raw)
At the top of my program I have 'from future import unicode_literals'.
The relevant lines from my program read - from multiprocessing.managers import BaseManager class MyManager(BaseManager): pass MyManager.register('my_function', my_function)
In multiprocessing.managers.py, the following lines are executed -
605 @classmethod 606 def register(cls, typeid, ...) [...] 632 def temp(...): [...] 642 temp.name = typeid
At this point, Python raises the exception TypeError: name must be set to a string object
I can fix it by changing my last line to - MyManager.register(str('my_function'), my_function)
Is it possible to allow name to be a unicode object?
If not, may I suggest that line 642 of managers.py is changed to - temp.name = str(typeid)
Frank Millman