niftools / blender_niftools_addon

The Blender Niftools Addon is a Blender add-on to enable import and export of NetImmese File Formats including .nif, .kf, .egm.
http://www.niftools.org
Other
386 stars 104 forks source link

can't open version 20.3.1.1 #614

Closed rioaje closed 10 months ago

rioaje commented 11 months ago

Hello i am trying to open Fantasy Frontier file, some version 20.3.1.1 can be opened, but mostly has this error.

blender 3.3 niftools 1.0

Python: Traceback (most recent call last):
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\operators\nif_import_op.py", line 134, in execute
    return NifImport(self, context).execute()
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\nif_import.py", line 74, in execute
    self.load_files()  # needs to be first to provide version info.
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\nif_import.py", line 140, in load_files
    NifData.init(NifFile.load_nif(NifOp.props.filepath))
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\file_io\nif.py", line 65, in load_nif
    data = NifFormat.NifFile.from_stream(nif_stream)
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\formats\nif\__init__.py", line 531, in from_stream
    instance.read_blocks(stream)
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\formats\nif\__init__.py", line 299, in read_blocks
    block = block_class.from_stream(stream, self, 0, None)
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\base_struct.py", line 403, in from_stream
    cls.read_fields(stream, instance)
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\base_struct.py", line 204, in read_fields
    setattr(instance, field_name, field_type.from_stream(stream, instance.context, *arguments))
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\array.py", line 107, in from_stream
    new_array.read(stream)
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\array.py", line 64, in read
    self[:] = self.fill(lambda: self.dtype.from_stream(stream, self.context, self.arg, self.template))
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\array.py", line 79, in fill
    self[:] = [function_to_generate() for _ in range(self.shape[0])]
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\array.py", line 79, in <listcomp>
    self[:] = [function_to_generate() for _ in range(self.shape[0])]
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\array.py", line 64, in <lambda>
    self[:] = self.fill(lambda: self.dtype.from_stream(stream, self.context, self.arg, self.template))
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\base_struct.py", line 403, in from_stream
    cls.read_fields(stream, instance)
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\base_struct.py", line 204, in read_fields
    setattr(instance, field_name, field_type.from_stream(stream, instance.context, *arguments))
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\io_scene_niftools\dependencies\generated\formats\nif\basic.py", line 53, in from_stream
    return cls.unpack(stream.read(cls.size))[0]
struct.error: unpack requires a buffer of 1 bytes

r303.zip

Candoran2 commented 11 months ago

Could you post the nif by attaching it to the issue in a zip file?

rioaje commented 11 months ago

Could you post the nif by attaching it to the issue in a zip file?

don't i already attached the .zip file? here i uploaded it again r303.zip

Candoran2 commented 11 months ago

Ah, sorry, must have skipped over that. I'll have a look when I have the time.

Candoran2 commented 10 months ago

Have you tried the new release? It appears to import your posted nif.

rioaje commented 10 months ago

Have you tried the new release? It appears to import your posted nif.

hello, i just test with the new release. it working without issue. thanks