Hi Igor,
Obviously, that's a Python example but you didn't specify which interface you're using. In any case, that shows you the right property to access on the Solution to get the viscosity.
Finally, since you mentioned "pure CO2", are you using the classes like ct.CarbonDioxide()? If so, those classes don't include transport data (except water), so you'll need to load a different input file that has transport property definitions for CO2. Generally, that will mean it will only be applicable for the gas phase.
Best,
Bryan