mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Otherwise under Python2 the following exception is raised:
```
$ python2
Python 2.7.17 (default, Nov 7 2019, 10:07:09)
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import io
>>> with io.open('foo.txt', 'w', encoding='utf-8') as fh:
... fh.write('foo')
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
TypeError: write() argument 1 must be unicode, not str
```