[Bf-committers] Syntax error in export_3ds.py
IRIE Shinsuke
irieshinsuke at yahoo.co.jp
Sun Jul 8 15:55:29 CEST 2012
Hi CoDEmanX,
r3595 causes another error:
Traceback (most recent call last):
File "/usr/lib/python3.2/runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python3.2/runpy.py", line 73, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.2/py_compile.py", line 187, in <module>
sys.exit(main())
File "/usr/lib/python3.2/py_compile.py", line 169, in main
compile(filename, doraise=True)
File "/usr/lib/python3.2/py_compile.py", line 116, in compile
codestring = f.read()
File "/usr/lib/python3.2/codecs.py", line 300, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 905: invalid continuation byte
export_3ds.py was accidentally saved with non UTF-8 character encoding.
12/07/08, CoDEmanX wrote:
> Commited fix:
>
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3595
>
> Should now work as expected.
>
> Thanks for reporting!
>
>
> Am 08.07.2012 06:08, schrieb IRIE Shinsuke:
>> Hi,
>>
>> When I was byte-compiling release/scripts/addons/ (r3577), I got a
>> syntax error in io_scene_3ds/export_3ds.py as follows:
>>
>> File "/usr/share/blender/2.63/scripts/addons/io_scene_3ds/export_3ds.py", line 227
>> """
>> class _3ds_point_4d(object):
>> """Class representing a four-dimensional point for a 3ds file, for instance a quaternion."""
>>
>>
>> ^
>> SyntaxError: invalid syntax
>>
>>
>> The triple-quotes """...""" are enclosed by the same style of
>> triple-quotes:
>>
>> """
>> class _3ds_point_4d(object):
>> """Class representing a four-dimensional point for a 3ds file, for instance a quaternion."""
>> __slots__ = ...
>>
>> """
>>
>> so the inside of the inner ones is not a string literal.
>> Please use the different style of triple-quotes like below:
>>
>> '''
>> class _3ds_point_4d(object):
>> """Class representing a four-dimensional point for a 3ds file, for instance a quaternion."""
>> __slots__ = ...
>>
>> '''
>>
>> Anyway, I think triple-quotes shouldn't be used to comment out
>> multiple lines.
>>
>
--
IRIE Shinsuke
More information about the Bf-committers
mailing list