You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've got some tenants that are using a "/" in their name causing python to not create the file and crash with the following:
16/03/2021 07:38:50 PM - INFO - Verifying output parameter passed Traceback (most recent call last): File "sophos_central_main.py", line 570, in <module> main(args) File "sophos_central_main.py", line 488, in main get_inventory(tenant_info, output, page_size, splunk_creds, tenant) File "sophos_central_main.py", line 140, in get_inventory events = api_output.process_output(output, json_data, tenant_url_data, tenant_id, api, sourcetype_value) File "C:\Users\administrator.CORP\Documents\sophos_mar2021\lib\site-packages\sophos_central_api_connector\sophos_central_api_output.py", line 23, in process_output process_output_json(json_items, filename, api) File "C:\Users\administrator.CORP\Documents\sophos_mar2021\lib\site-packages\sophos_central_api_connector\sophos_central_api_output.py", line 44, in process_output_json with open(os.path.join(final_inv_path, filename), "w", encoding='utf-8') as ep_file: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\administrator.CORP\\Documents\\sophos_mar2021\\lib\\site-packages\\sophos_central_api_connector\\output\\get_inventory\\**/*** Unlimited_fdb34fa2-fa6b-4217-92e9-76294a158613.json'
Would be good to potentially have a catch statement for special characters and replace them with either underscores or allowable characters.
Thanks!
The text was updated successfully, but these errors were encountered:
We've got some tenants that are using a "/" in their name causing python to not create the file and crash with the following:
16/03/2021 07:38:50 PM - INFO - Verifying output parameter passed Traceback (most recent call last): File "sophos_central_main.py", line 570, in <module> main(args) File "sophos_central_main.py", line 488, in main get_inventory(tenant_info, output, page_size, splunk_creds, tenant) File "sophos_central_main.py", line 140, in get_inventory events = api_output.process_output(output, json_data, tenant_url_data, tenant_id, api, sourcetype_value) File "C:\Users\administrator.CORP\Documents\sophos_mar2021\lib\site-packages\sophos_central_api_connector\sophos_central_api_output.py", line 23, in process_output process_output_json(json_items, filename, api) File "C:\Users\administrator.CORP\Documents\sophos_mar2021\lib\site-packages\sophos_central_api_connector\sophos_central_api_output.py", line 44, in process_output_json with open(os.path.join(final_inv_path, filename), "w", encoding='utf-8') as ep_file: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\administrator.CORP\\Documents\\sophos_mar2021\\lib\\site-packages\\sophos_central_api_connector\\output\\get_inventory\\**/*** Unlimited_fdb34fa2-fa6b-4217-92e9-76294a158613.json'
Would be good to potentially have a catch statement for special characters and replace them with either underscores or allowable characters.
Thanks!
The text was updated successfully, but these errors were encountered: