Open jservonnat opened 4 years ago
@rigoudy actually it looks like all other methods return unicodes instead of string... this is the case for .crs, cfile() (not if target is specified),
@jservonnat yes, this change is expected. Unicode becomes the default for strings in python3.
To bypass this difficulty, you should at least do the following changes :
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division, unicode_literals, absolute_import
import six
if isinstance(elt, six.string_types)
It should resolve most problems with encoding.
Tell me if you need help, Gaëlle
P.S.: You can find other tips for python2-python3 compatibility here: http://python-future.org/compatible_idioms.html#strings-and-bytes
@rigoudyg the .baseFiles() method of the climaf dataset returns now a unicode instead of a string. Is it on purpose? If yes I will fix the bugs associated with this change wherever I find them, if not can we simply keep the string as output?