-
Notifications
You must be signed in to change notification settings - Fork 13
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
Script is running into errors #32
Comments
This is a bug in that it's attempting to write to a non-existent directory. Quick fix is just to do a |
Can you please update the script to include this and push it to Github ?
Thanks,
Rohan
… On Dec 19, 2023, at 1:05 PM, jrandrusk ***@***.***> wrote:
This is a bug in that it's attempting to write to a non-existent directory. Quick fix is just to do amkdir rejected_logunder the logs directory and re-run the script. Would have thought this would have been fixed by now.
—
Reply to this email directly, view it on GitHub <#32 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ALS3B5PTYIQ66BAAMJFZ5LTYKHJNDAVCNFSM6AAAAABA3Q3AKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTGI2TANBVGM>.
You are receiving this because you authored the thread.
|
@rohan-zscaler @jrandrusk please review #27 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
12/19/2023 05:10:30 PM Successfully prepared 997 Indicators for Zscaler API
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\eparra\Desktop\zscaler-FalconX-integration\intelbridge_main.py", line 26, in
main()
File "C:\Users\eparra\Desktop\zscaler-FalconX-integration\intelbridge_main.py", line 18, in main
intelbridge.start()
File "C:\Users\eparra\Desktop\zscaler-FalconX-integration\intelbridge\intelbridge.py", line 135, in start
deleted, loop = self.etl_loop(falcon, zs_token, deleted, loop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eparra\Desktop\zscaler-FalconX-integration\intelbridge\intelbridge.py", line 105, in etl_loop
ingestable, amount_rejected = self.prepare(zs_token, indicators)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eparra\Desktop\zscaler-FalconX-integration\intelbridge\intelbridge.py", line 59, in prepare
prepared, amount_rejected_crwd = prepare_indicators(indicators)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eparra\Desktop\zscaler-FalconX-integration\intelbridge\indicators\indicators.py", line 105, in prepare_indicators
write_rejected("regex filter rejected", rejected)
File "C:\Users\eparra\Desktop\zscaler-FalconX-integration\intelbridge\util\util.py", line 100, in write_rejected
f = open(data_file, 'a')
^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'logs/rejected_log/data_rejected_2023-12-19.log'
I had to comment following lines to make it work. Can you pls take a look at add the fix?
def write_rejected(message, entry):
95 """writes rejected URLs to a log file
96 """
97 # rejected_indicators_data = f"logs/rejected_log/data_rejected"
98 # data_file = rejected_indicators_data
99 # data_file = data_file + "_" + time.strftime("%Y-%m-%d", time.gmtime()) +".log"
100 # f = open(data_file, 'a')
101 # f.write(f"{time.strftime('%Y-%m-%d', time.gmtime())}: {message}: {entry}")
102 # f.close()
103 return
The text was updated successfully, but these errors were encountered: