jmplonka / InventorLoader

Workbench for FreeCAD to loads or import Autodesk (R) Inventor (R) files.
GNU General Public License v2.0
119 stars 17 forks source link

UTF decode errors importing .F3D #88

Open dezanche opened 4 weeks ago

dezanche commented 4 weeks ago

I'm getting the following error on pretty much any .F3D file I try to import (the rest don't import anything):

14:24:08  Reading: C:\Users\...\Fusion360\Admin Project\Fabricate ready\Full 3D model_v16.f3d
14:24:08  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\...\AppData\Roaming\FreeCAD\Mod\InventorLoader\.\importerIL.py", line 147, in open
    _open(filename, skip, only, root)
  File "C:\Users\...\AppData\Roaming\FreeCAD\Mod\InventorLoader\.\importerIL.py", line 127, in _open
    reader = read(filename)
  File "C:\Users\...\AppData\Roaming\FreeCAD\Mod\InventorLoader\.\importerIL.py", line 70, in read
    if (importerF3D.read(filename)):
  File "C:\Users\...\AppData\Roaming\FreeCAD\Mod\InventorLoader\.\importerF3D.py", line 144, in read
    folder = read_manifest(f3d, 'Manifest.dat')
  File "C:\Users\...\AppData\Roaming\FreeCAD\Mod\InventorLoader\.\importerF3D.py", line 107, in read_manifest
    folder, i = getLen32Text16(data, i) # -> folder name
  File "C:\Users\...\AppData\Roaming\FreeCAD\Mod\InventorLoader\.\importerUtils.py", line 895, in getLen32Text16
    txt = data[i: end].decode('UTF-16LE')
  File "C:\Program Files\FreeCAD 0.21\bin\lib\encodings\utf_16_le.py", line 16, in decode
    return codecs.utf_16_le_decode(input, errors, True)
<class 'UnicodeDecodeError'>: 'utf-16-le' codec can't decode byte 0x01 in position 5420: truncated data>

Any ideas?