Doing some reading, there may be an issue returning certain datatypes in Python to UiPath as it requires a .NET object type. It seems that string variables do not have this issue however.
Can you test your py script and workflow first by trying to return a test string variable first? Just to ensure that it is indeed the issue