Specify text vs binary mode for opening files.
[htsworkflow.git] / htsworkflow / util / rdfhelp.py
index 33197ddb9631f4f07cfb6114bea4a3516a034ed0..ea1020c7b28fde8e4213b960afb7b90233d40300 100644 (file)
@@ -344,7 +344,7 @@ def add_default_schemas(model, schema_path=None):
         for path in schema_path:
             for pathname in glob(os.path.join(path, '*.turtle')):
                 url = 'file://' + os.path.splitext(pathname)[0]
-                stream = open(pathname, 'r')
+                stream = open(pathname, 'rt')
                 add_schema(model, stream, url)
                 stream.close()