<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error with Import/Export script. in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/240027#M8925</link>
    <description>&lt;P&gt;Sounds like you should disable Accounting in the relevant rule before running the script.&lt;BR /&gt;Then you can change it back after importing.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2025 03:20:03 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2025-01-30T03:20:03Z</dc:date>
    <item>
      <title>Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197167#M8163</link>
      <description>&lt;P&gt;While trying to import a policy package using the Import/Export python script, it gets as far as adding the access sections and then the script just dies.&lt;/P&gt;&lt;P&gt;Imported 275 out of 275 access-rules (100%)&lt;/P&gt;&lt;P&gt;Adding access-sections&lt;/P&gt;&lt;P&gt;Imported 20 out of 55 access-sections (36%)&lt;/P&gt;&lt;P&gt;Imported 40 out of 55 access-sections (72%)&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 71, in &amp;lt;module&amp;gt;&lt;BR /&gt;import_package(client, args)&lt;BR /&gt;File "/root/ExportImportPolicyPackage/importing/import_package.py", line 56, in import_package&lt;BR /&gt;layers_to_attach = import_objects(args.file, client, {}, package, None, args)&lt;BR /&gt;File "/root/ExportImportPolicyPackage/importing/import_objects.py", line 208, in import_objects&lt;BR /&gt;import_objects(rulebase_object_file.name, client, changed_layer_names, package, layer_name, args)&lt;BR /&gt;File "/root/ExportImportPolicyPackage/importing/import_objects.py", line 196, in import_objects&lt;BR /&gt;counter, position_decrement_due_to_rules = add_object(line, counter, position_decrement_due_to_rules,&lt;BR /&gt;File "/root/ExportImportPolicyPackage/importing/import_objects.py", line 617, in add_object&lt;BR /&gt;return add_object(line, counter, position_decrement_due_to_rule, position_decrement_due_to_section, fields,&lt;BR /&gt;File "/root/ExportImportPolicyPackage/importing/import_objects.py", line 617, in add_object&lt;BR /&gt;return add_object(line, counter, position_decrement_due_to_rule, position_decrement_due_to_section, fields,&lt;BR /&gt;File "/root/ExportImportPolicyPackage/importing/import_objects.py", line 617, in add_object&lt;BR /&gt;return add_object(line, counter, position_decrement_due_to_rule, position_decrement_due_to_section, fields,&lt;BR /&gt;[Previous line repeated 976 more times]&lt;BR /&gt;File "/root/ExportImportPolicyPackage/importing/import_objects.py", line 511, in add_object&lt;BR /&gt;if not api_reply.success and "name" in payload and "More than one object" in reply_err_msg:&lt;BR /&gt;TypeError: argument of type 'RecursionError' is not iterable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm also seeing a lot of the following errors:&lt;/P&gt;&lt;P&gt;Failed to import access-rule with name [SSH/SFTP/RDP Tectrade - TSM]. Error: code: generic_err_object_not_found&lt;BR /&gt;message: Requested object [import_error_due_to_missing_fields_import_error_due_to_missing_fields_import_error_due_to_missing_fields_import_error_due_to_missing_fields_MS-TeamServices] not found&lt;/P&gt;&lt;P&gt;Also failed to generate placeholder object: code: err_validation_failed&lt;BR /&gt;message: Validation failed with 1 warning and 1 blocking-error&lt;BR /&gt;warnings:&lt;BR /&gt;- message: The port is already used by another service.&lt;BR /&gt;blocking-errors:&lt;BR /&gt;- message: Object name can not exceed 100 characters&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on how to overcome this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 10:50:09 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197167#M8163</guid>
      <dc:creator>khodgson_bts</dc:creator>
      <dc:date>2023-11-06T10:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197170#M8164</link>
      <description>&lt;P&gt;Can you identify an object on which it fails?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 11:13:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197170#M8164</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2023-11-06T11:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197172#M8165</link>
      <description>&lt;P&gt;No not really. It seems to be all of them.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 11:22:34 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197172#M8165</guid>
      <dc:creator>khodgson_bts</dc:creator>
      <dc:date>2023-11-06T11:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197174#M8166</link>
      <description>&lt;P&gt;Please open a support case for this via &lt;A href="https://help.checkpoint.com" target="_blank"&gt;https://help.checkpoint.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 11:46:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197174#M8166</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2023-11-06T11:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197175#M8167</link>
      <description>&lt;P&gt;On the advice of a colleague, I used the "--skip-import-sections" flag and that seems to have resolved the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 11:48:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197175#M8167</guid>
      <dc:creator>khodgson_bts</dc:creator>
      <dc:date>2023-11-06T11:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197182#M8168</link>
      <description>&lt;P&gt;Interesting. Good to know it works for you now.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 12:15:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/197182#M8168</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2023-11-06T12:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/220577#M8599</link>
      <description>&lt;P&gt;How did you input the --skip-import-sections flags?&amp;nbsp; First time I am using the script and I am not too familiar with python. but I am getting the same errors in the original post.&amp;nbsp;&lt;/P&gt;&lt;P&gt;python3 import_export_package.py&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Error message&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding access-sections&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 75, in &amp;lt;module&amp;gt;&lt;BR /&gt;import_package(client, args)&lt;BR /&gt;File "/home/admin/ExportImportPolicyPackage-master/importing/import_package.py ", line 56, in import_package&lt;BR /&gt;layers_to_attach = import_objects(args.file, client, {}, package, None, args )&lt;BR /&gt;File "/home/admin/ExportImportPolicyPackage-master/importing/import_objects.py ", line 208, in import_objects&lt;BR /&gt;import_objects(rulebase_object_file.name, client, changed_layer_names, packa ge, layer_name, args)&lt;BR /&gt;File "/home/admin/ExportImportPolicyPackage-master/importing/import_objects.py ", line 199, in import_objects&lt;BR /&gt;changed_layer_names, api_call, num_objects, client, args, package)&lt;BR /&gt;File "/home/admin/ExportImportPolicyPackage-master/importing/import_objects.py ", line 620, in add_object&lt;BR /&gt;changed_layer_names, api_call, num_objects, client, args, package)&lt;BR /&gt;File "/home/admin/ExportImportPolicyPackage-master/importing/import_objects.py ", line 620, in add_object&lt;BR /&gt;changed_layer_names, api_call, num_objects, client, args, package)&lt;BR /&gt;File "/home/admin/ExportImportPolicyPackage-master/importing/import_objects.py ", line 620, in add_object&lt;BR /&gt;changed_layer_names, api_call, num_objects, client, args, package)&lt;BR /&gt;[Previous line repeated 976 more times]&lt;BR /&gt;File "/home/admin/ExportImportPolicyPackage-master/importing/import_objects.py ", line 511, in add_object&lt;BR /&gt;if not api_reply.success and "name" in payload and "More than one object" in reply_err_msg:&lt;BR /&gt;TypeError: argument of type 'RecursionError' is not iterable&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2024 15:30:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/220577#M8599</guid>
      <dc:creator>EJ1</dc:creator>
      <dc:date>2024-07-12T15:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/220735#M8601</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;You literally just add&amp;nbsp;&lt;FONT face="courier new,courier"&gt;--skip-import-sections&lt;/FONT&gt;&lt;SPAN&gt; to the end of the command.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 08:50:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/220735#M8601</guid>
      <dc:creator>khodgson_bts</dc:creator>
      <dc:date>2024-07-15T08:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/239970#M8924</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for the tip. In my case didn't work, I applied "python3 import_export_package.py -f /home/scpuser/export.tar.gz -n Standard2 --skip-duplicate-objects true --skip-import-sections true" and result was the same, but the errors didn't appear in the log. These are the last lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Imported 37 out of 37 access-rules (100%)&lt;/P&gt;&lt;P&gt;Failed to publish import of access-rules from tar file #1.3700000000000001! Access-rules from said file were not imported!. Error: code: err_publish_failed&lt;BR /&gt;message: Publish failed because of validation errors&lt;BR /&gt;errors:&lt;BR /&gt;- message: ICPM doesn't support accounting logs in Rule.&lt;/P&gt;&lt;P&gt;- message: ICPM doesn't support accounting logs in Rule.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Skip import access-section&lt;/P&gt;&lt;P&gt;Attaching layers to package&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 13:34:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/239970#M8924</guid>
      <dc:creator>iesnoz</dc:creator>
      <dc:date>2025-01-29T13:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/240027#M8925</link>
      <description>&lt;P&gt;Sounds like you should disable Accounting in the relevant rule before running the script.&lt;BR /&gt;Then you can change it back after importing.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 03:20:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/240027#M8925</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2025-01-30T03:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Import/Export script.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/240054#M8926</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for the tip, I already had disabled the accounting in all the rules, but error appeared anyway. I opened a case and support sent me the link to this SK:&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.checkpoint.com/results/sk/sk182892" target="_blank"&gt;https://support.checkpoint.com/results/sk/sk182892&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It's necessary not only to disable accounting on ICMP rules, but also to disable icmp-proto. With this SK my problem was solved.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 09:04:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Error-with-Import-Export-script/m-p/240054#M8926</guid>
      <dc:creator>iesnoz</dc:creator>
      <dc:date>2025-01-30T09:04:00Z</dc:date>
    </item>
  </channel>
</rss>

