taniwha / io_object_mu

Python .mu reader/writer and blender import/export addon
GNU General Public License v2.0
120 stars 51 forks source link

Config parser fails if empty cfg encountered #25

Closed taniwha closed 4 years ago

taniwha commented 4 years ago
Traceback (most recent call last):
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 106, in execute
    return import_craft_op(self, context, **keywords)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 80, in import_craft_op
    obj = import_craft(filepath)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\import_craft.py", line 44, in import_craft
    gamedata = GameData(Preferences().GameData)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 146, in __init__
    self.create_db()
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 129, in create_db
    recurse_tree(self.root, self.build_db)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 36, in recurse_tree
    recurse_tree(p, func)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 36, in recurse_tree
    recurse_tree(p, func)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 38, in recurse_tree
    func(p)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 102, in build_db
    self.process_cfg(path)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\import_craft\gamedata.py", line 89, in process_cfg
    cfg = ConfigNode.loadfile(path)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\cfgnode\cfgnode.py", line 90, in loadfile
    return cls.load(text)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\cfgnode\cfgnode.py", line 75, in load
    script = Script("", text, "{}=", False)
  File "C:\Users\Josselin.LeBec-PC\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_object_mu-master\cfgnode\script.py", line 32, in __init__
    elif text[0] == u"\ufeff":
IndexError: string index out of range

location: <unknown location>:-1

bpy.ops.import_object.ksp_craft(filepath="C:\\Program Files (x86)\\Steam\\steamapps\\common\\Kerbal Space Program\\Ships\\VAB\\AeroEquus.craft")