Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-03 06:47:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-03 06:47:36 +0400
commit384d5473826ab927d0297142867ef0335c11c1d3 (patch)
tree5ca939fb8bb24cd59fc4288d6cfd8576f4a8710f /io_anim_acclaim
parent2f37da95a310d8590cf3a6aaf16b54bcba3ffa84 (diff)
fix for error importing non utf8 file, in this case it was the authors name so data loads in fine.
Diffstat (limited to 'io_anim_acclaim')
-rw-r--r--io_anim_acclaim/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_anim_acclaim/__init__.py b/io_anim_acclaim/__init__.py
index 955ff6e7..4a47b9a3 100644
--- a/io_anim_acclaim/__init__.py
+++ b/io_anim_acclaim/__init__.py
@@ -59,7 +59,7 @@ class DataStructure:
def __init__(self, file_path, scale=1.):
self.scale = scale
- source = open(file_path).read()
+ source = open(file_path, encoding="utf-8", errors="replace").read()
sections = dict(DataStructure.doc.findall(source))
if not sections:
raise ValueError("Wrong file structure.")
@@ -120,7 +120,7 @@ class DataStructure:
"""
Parse an Acclaim Motion Capture file and iterates over the data
"""
- amc = open(filename)
+ amc = open(filename, encoding="utf-8", errors="replace")
l = ' '
while l and not l[0].isdigit():
l = amc.readline().strip()