MdfException: Expected "##FH" block @0xc4e3798 but found "b'\x00\x00\x00\x00'" #1105
dusanpolovina
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
recieved this traceback, have multiple files that raise this exception:
asammdf - ERROR - Expected "##FH" block @0x3d860b8 but found "b'\x00\x00\x00\x00'"
NoneType: None
MdfException Traceback (most recent call last)
Cell In[3], line 412
410 if mf4_filename_translate == 1:
411 mf4key = get_key_by_value(drivefile_nonstandard_logdict, kk)
--> 412 mdfObj = MDF(prvd_source_path_string + mf4key, version = '4.10')
413 data = mdfObj.to_dataframe(channels = parameter_list, raster = parameter_list[0])
415 #data_import = MDF.to_dataframe(mdf)
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\asammdf\mdf.py:332, in MDF.init(self, name, version, channels, **kwargs)
330 self._mdf = mdf_v3.MDF3(name, channels=channels, **kwargs)
331 elif version in MDF4_VERSIONS:
--> 332 self._mdf = mdf_v4.MDF4(name, channels=channels, **kwargs)
333 elif version in MDF2_VERSIONS:
334 self._mdf = mdf_v2.MDF2(name, channels=channels, **kwargs)
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\asammdf\blocks\mdf_v4.py:385, in MDF4.init(self, name, version, channels, **kwargs)
383 self._file = mmap.mmap(self._mapped_file.fileno(), 0, access=mmap.ACCESS_READ)
384 self._from_filelike = False
--> 385 self._read(mapped=True, progress=progress)
387 else:
388 self._from_filelike = False
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\asammdf\blocks\mdf_v4.py:492, in MDF4._read(self, mapped, progress)
490 logger.warning(f"File history address {fh_addr:X} is outside the file size {self.file_limit}")
491 break
--> 492 history_block = FileHistory(address=fh_addr, stream=stream, mapped=mapped)
493 self.file_history.append(history_block)
494 fh_addr = history_block.next_fh_addr
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\asammdf\blocks\v4_blocks.py:5384, in FileHistory.init(self, **kwargs)
5381 message = f'Expected "##FH" block @{hex(address)} but found "{self.id}"'
5383 logger.exception(message)
-> 5384 raise MdfException(message)
5386 self.comment = get_text_v4(address=self.comment_addr, stream=stream)
5388 except KeyError:
MdfException: Expected "##FH" block @0x3d860b8 but found "b'\x00\x00\x00\x00'"
Beta Was this translation helpful? Give feedback.
All reactions