error on exporting
quabank opened this issue · 4 comments
Hi Eden!
after Done exporting layer. There show some problem.
Can't you fix these.
Thanks
Traceback (most recent call last):
File "c:\ExportImportPolicyPackage-master\import_export_package.py", line 66, in
export_package(client, args)
File "c:\ExportImportPolicyPackage-master\exporting\export_package.py", line 115, in export_package
export_to_tar(data_dict, timestamp, tar_file, singular_to_plural_dictionary[client.api_version].keys(),
File "c:\ExportImportPolicyPackage-master\utils.py", line 257, in export_to_tar
write_data(data_dict[api_type], tar_file_csv, ".csv")
File "c:\ExportImportPolicyPackage-master\utils.py", line 289, in write_data
writer.writerows(res)
File "C:\Exim\Python310\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u200b' in position 14321: character maps to
and while i importing
Creating a Policy Package named []
Importing general objects
Traceback (most recent call last):
File "c:\ExportImportPolicyPackage-master\import_export_package.py", line 68, in
import_package(client, args)
File "c:\ExportImportPolicyPackage-master\importing\import_package.py", line 56, in import_package
layers_to_attach = import_objects(args.file, client, {}, package, None, args)
File "c:\ExportImportPolicyPackage-master\importing\import_objects.py", line 83, in import_objects
version_file_name = [f for f in tar_files if f.name == "version.txt"][0]
IndexError: list index out of range
PS C:\ExportImportPolicyPackage-master>
Hi,
Seems like a configuration problem
I recommend opening a ticket in Check Point Support for further investigation.
Hi, Seems like a configuration problem I recommend opening a ticket in Check Point Support for further investigation.
Hi Eden,
Thanks for reply, It's come from Python environment. So i change to another Device and it's worked.
BTW i have a issue. When i import policy on new SMC that have some objects same with my policy im importing. The same Object have changed to "NAME_COLLISION_RESOLVED".
You have any suggestions to fix this.
Thanks for your wonderful script. It's helped me lot.
Hi,
You can use the --skip-duplicate-objects flag if you want the tool to use the objects that already exist.