<?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: I do have Management Server on Open Server with 4 policy package in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128113#M6189</link>
    <description>&lt;P&gt;Hmmm did you type in 'NTPC_App' when it asks for the Policy Package Name, so between the two ' ?&lt;/P&gt;&lt;P&gt;I just created a policy Package and named it NTPC_App and didn't have any issues:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[Expert@xxxxxxxxx:0]# python import_export_package.py       

Welcome to the Policy Package Import/Export Tool.
What would you like to do?
1. Import a package
2. Export a package
99. Exit
2
Please enter a Policy Package name to export:
'NTPC_App'
Please select a login method:
1. Enter user credentials manually
2. Login as Root
3. Use an existing session file
4. Use an existing session UID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because that should work from what I see.&lt;/P&gt;&lt;P&gt;Maybe try to rename the Policy, Install Database and try again.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Aug 2021 13:45:26 GMT</pubDate>
    <dc:creator>796570686578</dc:creator>
    <dc:date>2021-08-26T13:45:26Z</dc:date>
    <item>
      <title>I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128048#M6181</link>
      <description>&lt;P&gt;I do have four Management Server on Open Server with 4 policy package and want to export all policy package from this Management and import on one Single Management and also doing this&amp;nbsp;sk120342 and after this python toll this givening error.&lt;/P&gt;&lt;P&gt;[Expert@NTPC-MGMT:0]# python import_export_package.py&lt;/P&gt;&lt;P&gt;Welcome to the Policy Package Import/Export Tool.&lt;BR /&gt;What would you like to do?&lt;BR /&gt;1. Import a package&lt;BR /&gt;2. Export a package&lt;BR /&gt;99. Exit&lt;BR /&gt;2&lt;BR /&gt;Please enter a Policy Package name to export:&lt;BR /&gt;NTPC_App&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 26, in &amp;lt;module&amp;gt;&lt;BR /&gt;args = process_arguments(arg_parser)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/utils.py", line 96, in process_arguments&lt;BR /&gt;args = Menu(args).self_args&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 21, in __init__&lt;BR /&gt;self.build()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 146, in build&lt;BR /&gt;self.display()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 30, in display&lt;BR /&gt;self.handle_input()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 269, in handle_input&lt;BR /&gt;self.build()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 146, in build&lt;BR /&gt;self.display()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 30, in display&lt;BR /&gt;self.handle_input()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 167, in handle_input&lt;BR /&gt;self.self_args.name = input()&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;NameError: name 'NTPC_App' is not defined&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 05:00:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128048#M6181</guid>
      <dc:creator>Satya2021</dc:creator>
      <dc:date>2021-08-26T05:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128069#M6182</link>
      <description>&lt;P&gt;It looks like the policy "NTPC_App" does not exist.&lt;/P&gt;&lt;P&gt;1. Run the "GuiDBedit.exe" Database Tool. Go to "Policies" table -&amp;gt; policies_collections&lt;BR /&gt;2. Compare object names with the one used in the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Marek&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 07:42:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128069#M6182</guid>
      <dc:creator>MLad</dc:creator>
      <dc:date>2021-08-26T07:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128073#M6183</link>
      <description>&lt;P&gt;Looks like package name is incorrect - what are the names of the policy packages ?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 08:05:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128073#M6183</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2021-08-26T08:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128076#M6184</link>
      <description>&lt;P&gt;There are two policy package on Management- "Standard" and&amp;nbsp; "NTPC_App"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I have tried with both but getting same error&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 08:38:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128076#M6184</guid>
      <dc:creator>Satya2021</dc:creator>
      <dc:date>2021-08-26T08:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128097#M6185</link>
      <description>&lt;P&gt;GUI names don't necessarily match API names. Try this from expert mode of management server, it will give you the list of packages as seen by API.&amp;nbsp; If using MDM, you may need additional parameter &lt;EM&gt;domain "domain-name-here"&lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;mgmt_cli -r true show packages limit 50 offset 0 details-level "standard" --format json&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 12:50:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128097#M6185</guid>
      <dc:creator>Srdjan_B</dc:creator>
      <dc:date>2021-08-26T12:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128105#M6186</link>
      <description>&lt;P&gt;Please see the policy packages&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Expert@NTPC-MGMT:0]# mgmt_cli -r true show packages limit 50 offset 0 details-level "Standard" --format json&lt;BR /&gt;{&lt;BR /&gt;"packages" : [ {&lt;BR /&gt;"uid" : "e9dc460a-48a8-47e7-89a6-6bb2f5ab1056",&lt;BR /&gt;"name" : "NTPC_App",&lt;BR /&gt;"type" : "package",&lt;BR /&gt;"domain" : {&lt;BR /&gt;"uid" : "41e821a0-3720-11e3-aa6e-0800200c9fde",&lt;BR /&gt;"name" : "SMC User",&lt;BR /&gt;"domain-type" : "domain"&lt;BR /&gt;}&lt;BR /&gt;}, {&lt;BR /&gt;"uid" : "512b2821-ee6d-41d1-a7cb-5ed957d90017",&lt;BR /&gt;"name" : "Standard",&lt;BR /&gt;"type" : "package",&lt;BR /&gt;"domain" : {&lt;BR /&gt;"uid" : "41e821a0-3720-11e3-aa6e-0800200c9fde",&lt;BR /&gt;"name" : "SMC User",&lt;BR /&gt;"domain-type" : "domain"&lt;BR /&gt;}&lt;BR /&gt;} ],&lt;BR /&gt;"from" : 1,&lt;BR /&gt;"to" : 2,&lt;BR /&gt;"total" : 2&lt;BR /&gt;}&lt;BR /&gt;[Expert@NTPC-MGMT:0]#&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 13:18:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128105#M6186</guid>
      <dc:creator>Satya2021</dc:creator>
      <dc:date>2021-08-26T13:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128107#M6187</link>
      <description>&lt;P&gt;Hi, I just tested the tool and you need to type&lt;/P&gt;&lt;P&gt;'PackageName' so '&lt;SPAN&gt;NTPC_App'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 13:31:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128107#M6187</guid>
      <dc:creator>796570686578</dc:creator>
      <dc:date>2021-08-26T13:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128109#M6188</link>
      <description>&lt;P&gt;Thanks for this.&lt;/P&gt;&lt;P&gt;But I have tested that time with policy packages and it gets same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please share me Steps for exporting policy and importing&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 13:38:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128109#M6188</guid>
      <dc:creator>Satya2021</dc:creator>
      <dc:date>2021-08-26T13:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128113#M6189</link>
      <description>&lt;P&gt;Hmmm did you type in 'NTPC_App' when it asks for the Policy Package Name, so between the two ' ?&lt;/P&gt;&lt;P&gt;I just created a policy Package and named it NTPC_App and didn't have any issues:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[Expert@xxxxxxxxx:0]# python import_export_package.py       

Welcome to the Policy Package Import/Export Tool.
What would you like to do?
1. Import a package
2. Export a package
99. Exit
2
Please enter a Policy Package name to export:
'NTPC_App'
Please select a login method:
1. Enter user credentials manually
2. Login as Root
3. Use an existing session file
4. Use an existing session UID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because that should work from what I see.&lt;/P&gt;&lt;P&gt;Maybe try to rename the Policy, Install Database and try again.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 13:45:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128113#M6189</guid>
      <dc:creator>796570686578</dc:creator>
      <dc:date>2021-08-26T13:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128115#M6190</link>
      <description>&lt;P&gt;Also, let me know if the steps I showed below worked.&lt;/P&gt;&lt;P&gt;In case it does, in the next step, the username also needs to be entered between to '. So for example 'admin'&amp;nbsp;&lt;/P&gt;&lt;P&gt;The password doesn't need the two '&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case you run into an error that looks like this "TypeError: 'newline' is an invalid keyword argument for this function", let me know, I found a fix for it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Was able to export and import the package&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 13:59:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128115#M6190</guid>
      <dc:creator>796570686578</dc:creator>
      <dc:date>2021-08-26T13:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128117#M6191</link>
      <description>&lt;P&gt;Here is my Steps and still getting error&lt;/P&gt;&lt;P&gt;1- I have downloaded tools from&amp;nbsp;&lt;A href="https://github.com/CheckPointSW/ExportImportPolicyPackage" target="_blank"&gt;https://github.com/CheckPointSW/ExportImportPolicyPackage&lt;/A&gt;&amp;nbsp;and tools name is ExportImportPolicyPackage&lt;/P&gt;&lt;P&gt;2- I have uploaded this tool after unzip on $FWDIR/Python/bin/&lt;/P&gt;&lt;P&gt;3-[Expert@NTPC-MGMT:0]# cd /opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/&lt;/P&gt;&lt;P&gt;4-&amp;nbsp;[Expert@NTPC-MGMT:0]# python import_export_package.py&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 5, in &amp;lt;module&amp;gt;&lt;BR /&gt;from cpapi import APIClient, APIClientArgs&lt;BR /&gt;ImportError: No module named cpapi&lt;BR /&gt;[Expert@NTPC-MGMT:0]#&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 14:11:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128117#M6191</guid>
      <dc:creator>Satya2021</dc:creator>
      <dc:date>2021-08-26T14:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128120#M6192</link>
      <description>&lt;P&gt;Ohh alright that error. I had the same error before. What you need to to is, Download the&amp;nbsp;&amp;nbsp;Check Point API Python SDK&amp;nbsp;&amp;nbsp;.&lt;BR /&gt;Download the Code to your Management(unzipped), and then you need to add the Path to your environmental variable.&lt;BR /&gt;Configure your environment variables:&lt;/P&gt;&lt;P&gt;export PYTHONPATH=$PYTHONPATH:&amp;lt;“CP-SDK” FULL PATH&amp;gt;&lt;BR /&gt;For example, if you copied the SDK to the path “/home/admin/” the command will be:&lt;/P&gt;&lt;P&gt;export PYTHONPATH=$PYTHONPATH:/home/admin/cp_mgmt_api_python_sdk/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for me it was the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;export PYTHONPATH=$PYTHONPATH:/home/admin/cp_mgmt_api_python_sdk-master/&lt;/P&gt;&lt;P&gt;after performing these steps you should not get the error anymore!&lt;/P&gt;&lt;P&gt;Edit: Link to python sdk:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk" target="_blank"&gt;https://github.com/CheckPointSW/cp_mgmt_api_python_sdk&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 14:25:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128120#M6192</guid>
      <dc:creator>796570686578</dc:creator>
      <dc:date>2021-08-26T14:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128124#M6193</link>
      <description>&lt;P&gt;Thanks. but getting same error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Expert@NTPC-MGMT:0]# python import_export_package.py&lt;/P&gt;&lt;P&gt;Welcome to the Policy Package Import/Export Tool.&lt;BR /&gt;What would you like to do?&lt;BR /&gt;1. Import a package&lt;BR /&gt;2. Export a package&lt;BR /&gt;99. Exit&lt;BR /&gt;2&lt;BR /&gt;Please enter a Policy Package name to export:&lt;BR /&gt;NTPC_App&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 26, in &amp;lt;module&amp;gt;&lt;BR /&gt;args = process_arguments(arg_parser)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/utils.py", line 96, in process_arguments&lt;BR /&gt;args = Menu(args).self_args&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 21, in __init__&lt;BR /&gt;self.build()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 146, in build&lt;BR /&gt;self.display()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 30, in display&lt;BR /&gt;self.handle_input()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 269, in handle_input&lt;BR /&gt;self.build()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 146, in build&lt;BR /&gt;self.display()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 30, in display&lt;BR /&gt;self.handle_input()&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/menu.py", line 167, in handle_input&lt;BR /&gt;self.self_args.name = input()&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;NameError: name 'NTPC_App' is not defined&lt;BR /&gt;[Expert@NTPC-MGMT:0]#&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 14:39:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128124#M6193</guid>
      <dc:creator>Satya2021</dc:creator>
      <dc:date>2021-08-26T14:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128125#M6194</link>
      <description>&lt;P&gt;You need to type '&lt;SPAN&gt;NTPC_App' not NTPC_App&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 14:43:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128125#M6194</guid>
      <dc:creator>796570686578</dc:creator>
      <dc:date>2021-08-26T14:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128128#M6195</link>
      <description>&lt;P&gt;After giving password and it shows error. please help&lt;/P&gt;&lt;P&gt;The script will run with the following parameters:&lt;BR /&gt;Export Access-Control layers = True&lt;BR /&gt;Export NAT layers = True&lt;BR /&gt;Export Threat-Prevention layers = True&lt;BR /&gt;Export HTTPS Inspection layers = True&lt;BR /&gt;Output-file name = None&lt;BR /&gt;Management Server IP = 127.0.0.1&lt;BR /&gt;Management Server Port = 443&lt;BR /&gt;Management Server Domain = None&lt;BR /&gt;1. Change Settings&lt;BR /&gt;2. Run&lt;BR /&gt;99. Back&lt;BR /&gt;'admin'&lt;BR /&gt;Invalid input. Please choose an option in the range 1:2 or 99.&lt;BR /&gt;2&lt;BR /&gt;Please enter your username:&lt;BR /&gt;'admin'&lt;/P&gt;&lt;P&gt;Please enter your password:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 26, in &amp;lt;module&amp;gt;&lt;BR /&gt;args = process_arguments(arg_parser)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/utils.py", line 106, in process_arguments&lt;BR /&gt;log_file = open(args.log_file, "w",newline='')&lt;BR /&gt;TypeError: 'newline' is an invalid keyword argument for this function&lt;BR /&gt;[Expert@NTPC-MGMT:0]#&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 14:51:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128128#M6195</guid>
      <dc:creator>Satya2021</dc:creator>
      <dc:date>2021-08-26T14:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128131#M6196</link>
      <description>&lt;P&gt;I had the same error "&lt;SPAN&gt;TypeError: 'newline' is an invalid keyword argument for this function"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The error is because 'newline' was added in python 3 and python 2 doesn't support it yet. So you need to manually edit ALL&amp;nbsp; 'open' functions in utils.py that have&amp;nbsp;"w",newline='' to "w"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so for example &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;open(args.log_file, "w",newline='')&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;change to&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;open(args.log_file, "w")&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Not 100% sure if you need the "wb" or can leave it as "w" though. I tried with 'w' and it worked fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 15:04:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128131#M6196</guid>
      <dc:creator>796570686578</dc:creator>
      <dc:date>2021-08-26T15:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128165#M6198</link>
      <description>&lt;P&gt;please check this&lt;/P&gt;&lt;P&gt;Please enter your username:&lt;BR /&gt;'admin'&lt;/P&gt;&lt;P&gt;Please enter your password:&lt;/P&gt;&lt;P&gt;You currently do not have a record of this server's fingerprint.&lt;BR /&gt;Server's fingerprint: EF42F53F988948B14B51374527D066B2C4ED98B6&lt;BR /&gt;Do you accept this fingerprint? [y/n] y&lt;BR /&gt;Fingerprint saved.&lt;BR /&gt;Exporting Access Control layers&lt;/P&gt;&lt;P&gt;Exporting Access Layer [NTPC_App Network]&lt;/P&gt;&lt;P&gt;Retrieved 4 out of 4 rules (100%)&lt;/P&gt;&lt;P&gt;Processing rules and sections&lt;/P&gt;&lt;P&gt;Exporting hosts from layer [NTPC_App Network]&lt;/P&gt;&lt;P&gt;Exporting access rules from layer [NTPC_App Network]&lt;/P&gt;&lt;P&gt;Exporting access sections from layer [NTPC_App Network]&lt;/P&gt;&lt;P&gt;Exporting placeholders for unexportable objects from layer [NTPC_App Network]&lt;/P&gt;&lt;P&gt;Exporting layer settings of layer [NTPC_App Network]&lt;/P&gt;&lt;P&gt;Done exporting layer 'NTPC_App Network'.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "import_export_package.py", line 61, in &amp;lt;module&amp;gt;&lt;BR /&gt;export_package(client, args)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/exporting/export_package.py", line 55, in export_package&lt;BR /&gt;timestamp, ["access-rule", "access-section"], client.api_version)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/utils.py", line 228, in create_tar_file&lt;BR /&gt;export_to_tar(data_dict, timestamp, tar, lst, api_version)&lt;BR /&gt;File "/opt/CPsuite-R80.40/fw1/Python/bin/ExportImportPolicyPackage-master/utils.py", line 244, in export_to_tar&lt;BR /&gt;with open(file_name_csv, "w", newline='') as tar_file_csv, open(file_name_json, "w", newline='') as tar_file_json:&lt;BR /&gt;TypeError: 'newline' is an invalid keyword argument for this function&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 19:55:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128165#M6198</guid>
      <dc:creator>Satya2021</dc:creator>
      <dc:date>2021-08-26T19:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128169#M6199</link>
      <description>&lt;P&gt;Thank for helping me to exporting policy package&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 20:28:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128169#M6199</guid>
      <dc:creator>Satya2021</dc:creator>
      <dc:date>2021-08-26T20:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: I do have Management Server on Open Server with 4 policy package</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128196#M6201</link>
      <description>&lt;P&gt;Good Morning!&lt;/P&gt;&lt;P&gt;You are still getting the error message "&lt;SPAN&gt;'newline' is an invalid keyword&amp;nbsp;", so you haven't removed all "newline=''" parameters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Check the utils.py file again and search for newline. Any function that has the newline parameter, needs to be edited to&amp;nbsp;open(xxxxxx, "w") .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So there is at least one more&amp;nbsp; in line&amp;nbsp;&lt;SPAN&gt;244,&amp;nbsp;open(file_name_json, "w", newline=''), change to&amp;nbsp;&amp;nbsp;open(file_name_json, "w"). Just check the whole file for any newline parameters and remove them&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Glad I am able to help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 05:58:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/I-do-have-Management-Server-on-Open-Server-with-4-policy-package/m-p/128196#M6201</guid>
      <dc:creator>796570686578</dc:creator>
      <dc:date>2021-08-27T05:58:12Z</dc:date>
    </item>
  </channel>
</rss>

