Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if btyearray is not None before yield #230

Merged
merged 1 commit into from
Oct 24, 2023
Merged

check if btyearray is not None before yield #230

merged 1 commit into from
Oct 24, 2023

Conversation

ffalor
Copy link
Contributor

@ffalor ffalor commented Oct 18, 2023

Fix for the below issue

Traceback (most recent call last):
File "/home/fdr/FDR/falcon_data_replicator.py", line 503, in <module>
consume_data_replicator(s3_target, s3_cs, logger)
File "/home/fdr/FDR/falcon_data_replicator.py", line 270, in consume_data_replicator
res = fut.result()
File "/usr/lib64/python3.9/concurrent/futures/_base.py", line 439, in result
return self.__get_result()
File "/usr/lib64/python3.9/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/fdr/FDR/falcon_data_replicator.py", line 221, in process_queue_message
metrics = download_message_files(body, s3b, s3o, log_util)
File "/home/fdr/FDR/falcon_data_replicator.py", line 190, in download_message_files
result = handle_file(None, s3_path, s3ta, stream, log)
File "/home/fdr/FDR/falcon_data_replicator.py", line 123, in handle_file
total_events_in_file = transform_fdr_data_to_ocsf_data(
File "/home/fdr/FDR/ocsf/ocsf.py", line 139, in transform_fdr_data_to_ocsf_data
for event in read_fdr_part(chunk):
File "/home/fdr/FDR/ocsf/ocsf.py", line 114, in read_fdr_part
yield json.loads(tmp.decode('utf-8'))
File "/usr/lib64/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@ffalor ffalor requested a review from jshcodes as a code owner October 18, 2023 19:10
@ffalor ffalor added the bug Something isn't working label Oct 18, 2023
@ffalor ffalor self-assigned this Oct 18, 2023
@ffalor ffalor merged commit 210f7ce into CrowdStrike:main Oct 24, 2023
4 of 5 checks passed
@ffalor ffalor deleted the bugfixes branch October 24, 2023 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants