Getting a ChunkLen Error "not defined"
I am getting the following error while i am trying to create a aff4 file. I am running the following command:
python3 aff4.py -r --create-logical test.aff4 /home/development/E01_Files/
Adding: /home/development/E01_Files/Program Files/Messengernewalert.wav
Adding: /home/development/E01_Files/Program Files/Mozilla Firefoxplc4.dll
Adding: /home/development/E01_Files/Program Files/AIM6coolcore52.dll
Adding: /home/development/E01_Files/Program Files/Windows Media Player
Adding: /home/development/E01_Files/Program Files/NetMeetingmst123.dll
Adding: /home/development/E01_Files/Program Files/Movie Makermoviemk.exe
Traceback (most recent call last):
File "aff4.py", line 497, in
This class of error is identified with flake8 [^1]. Shell transcript demonstrating this, and similar errors (flagged with error code F821):
$ git rev-parse master
94a3583475c07ad92147f70ff8a19e9e36f12aa9
$ flake8 --version
5.0.4 (mccabe: 0.7.0, pycodestyle: 2.9.1, pyflakes: 2.5.0) CPython 3.9.6 on Darwin
$ flake8 _version.py aff4.py pyaff4 | grep chunkLen
pyaff4/aff4_image.py:91:16: F821 undefined name 'chunkLen'
pyaff4/aff4_image.py:92:51: F821 undefined name 'chunkLen'
$ flake8 _version.py aff4.py pyaff4 | grep F821
pyaff4/data_store.py:913:33: F821 undefined name 'errno'
pyaff4/logical.py:45:16: F821 undefined name 'UnixMetadata'
pyaff4/logical.py:55:16: F821 undefined name 'UnixMetadata'
pyaff4/crypt_image_test.py:388:5: F821 undefined name 'logging'
pyaff4/crypt_image_test.py:388:34: F821 undefined name 'logging'
pyaff4/utils.py:26:30: F821 undefined name 'unicode'
pyaff4/utils.py:32:16: F821 undefined name 'unicode'
pyaff4/utils.py:49:16: F821 undefined name 'unicode'
pyaff4/utils.py:68:33: F821 undefined name 'unicode'
pyaff4/aff4_image.py:91:16: F821 undefined name 'chunkLen'
pyaff4/aff4_image.py:92:51: F821 undefined name 'chunkLen'
[^1]: Disclaimer: Participation by NIST in the creation of the documentation of mentioned software is not intended to imply a recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that any specific software is necessarily the best available for the purpose.
see this page.
you need to define ' chunkLen = len(chunk)' at pyaff4/aff4_image.py line81
https://github.com/aff4/pyaff4/pull/30/files