After a fresh install and running the pystemon feeder I have an error when trying to open a decoded file.
If I attach the flask screen I have a TypeError: join() argument must be str or bytes, not 'NoneType' in b64_full_path = os.path.join(os.environ['AIL_HOME'], b64_path) (line 709 var/www/modules/hashDecoded/Flask_hashDecoded.py)
After some debugging I noticed that b64_path = r_serv_metadata.hget('metadata_hash:'+hash, 'saved_path') is None because the 'saved_path' key is not present in redis.
here an example of a hgetall on the same record
{'binary_decoder': '5', 'estimated_type': 'application/octet-stream', 'first_seen': '2020/05/13', 'last_seen': '2020/05/13', 'nb_seen_in_all_pastes': '1', 'size': '64'}
and here the complete traceback
Traceback (most recent call last):
File "/home/debian/ail-framework/AILENV/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/debian/ail-framework/AILENV/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/debian/ail-framework/AILENV/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/debian/ail-framework/AILENV/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/debian/ail-framework/AILENV/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/debian/ail-framework/AILENV/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/debian/ail-framework/AILENV/lib/python3.7/site-packages/flask_login/utils.py", line 272, in decorated_view
return func(*args, **kwargs)
File "./modules/Role_Manager.py", line 98, in decorated_view
return func(*args, **kwargs)
File "/home/debian/ail-framework//var/www/modules/hashDecoded/Flask_hashDecoded.py", line 709, in downloadHash
b64_full_path = os.path.join(os.environ['AIL_HOME'], b64_path)
File "/home/debian/ail-framework//AILENV/lib/python3.7/posixpath.py", line 94, in join
genericpath._check_arg_types('join', a, *p)
File "/home/debian/ail-framework//AILENV/lib/python3.7/genericpath.py", line 149, in _check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'NoneType'
After a fresh install and running the pystemon feeder I have an error when trying to open a decoded file.
If I attach the flask screen I have a
TypeError: join() argument must be str or bytes, not 'NoneType'
inb64_full_path = os.path.join(os.environ['AIL_HOME'], b64_path)
(line 709 var/www/modules/hashDecoded/Flask_hashDecoded.py)After some debugging I noticed that
b64_path = r_serv_metadata.hget('metadata_hash:'+hash, 'saved_path')
is None because the 'saved_path' key is not present in redis.here an example of a hgetall on the same record
{'binary_decoder': '5', 'estimated_type': 'application/octet-stream', 'first_seen': '2020/05/13', 'last_seen': '2020/05/13', 'nb_seen_in_all_pastes': '1', 'size': '64'}
and here the complete traceback
Anyone having the same issue?