- Products
- Learn
- Local User Groups
- Partners
- More
Welcome to Maestro Masters!
Talk to Masters, Engage with Masters, Be a Maestro Master!
Join our TechTalk: Malware 2021 to Present Day
Building a Preventative Cyber Program
Be a CloudMate!
Check out our cloud security exclusive space!
Check Point's Cyber Park is Now Open
Let the Games Begin!
As YOU DESERVE THE BEST SECURITY
Upgrade to our latest GA Jumbo
CheckFlix!
All Videos In One Space
Hello,
I'm trying to use the Python tool "exporting/importing a policy package"...Python version installed 2.7.14 but I'm having the following error:
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:
standard
Traceback (most recent call last):
File "...ExportImportPolicyPackage-master\import_export_package.py", line 26, in <module>
args = process_arguments(arg_parser)
File "...\ExportImportPolicyPackage-master\utils.py", line 98, in process_arguments
args = Menu(args).self_args
File "...\ExportImportPolicyPackage-master\menu.py", line 21, in __init__
self.build()
File "...\ExportImportPolicyPackage-master\menu.py", line 146, in build
self.display()
File "...\ExportImportPolicyPackage-master\menu.py", line 30, in display
self.handle_input()
File "...\ExportImportPolicyPackage-master\menu.py", line 269, in handle_input
self.build()
File "...\ExportImportPolicyPackage-master\menu.py", line 146, in build
self.display()
File "...\ExportImportPolicyPackage-master\menu.py", line 30, in display
self.handle_input()
File "...\ExportImportPolicyPackage-master\menu.py", line 167, in handle_input
self.self_args.name = input()
File "<string>", line 1, in <module>
NameError: name 'standard' is not defined
Can anyone help to solve this error?
I know you wrote, that python2 is installed, but do you have a python3 installed too? The error you are describing comes from python2, from README.md on https://github.com/CheckPointSW/ExportImportPolicyPackage:
"The tool is developed using Python language version 2.7.9 and Check Point API Python SDK. From version 5.0 the tool is developed using Python language version 3.7."
Running it with python3 does not produce any errors.
Try to use 'Standard' with an uppercase s
I did but i have the same error (i used other names like test or other names), it's in the beginning of the execution...before entering the IP addresse of the management server.
I think it's related to the code
I tried for my self an got the same error. It works when Standard is written in quotation marks:
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:
'Standard'
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
99. Back
Yes, I confirm that it's working with single quotes but i have to use the quotes for all inputs even the password.
But after entering the password with or without quotes, it exists....:
Please enter your password:
Traceback (most recent call last):
File "...\ExportImportPolicyPackage-master\import_expor
t_package.py", line 26, in <module>
args = process_arguments(arg_parser)
File "...\ExportImportPolicyPackage-master\utils.py", l
ine 108, in process_arguments
log_file = open(args.log_file, "w",newline='')
TypeError: 'newline' is an invalid keyword argument for this function
Apparently it dosn't take into account what is written for the password.
I think that the new version has a bug.
I know you wrote, that python2 is installed, but do you have a python3 installed too? The error you are describing comes from python2, from README.md on https://github.com/CheckPointSW/ExportImportPolicyPackage:
"The tool is developed using Python language version 2.7.9 and Check Point API Python SDK. From version 5.0 the tool is developed using Python language version 3.7."
Running it with python3 does not produce any errors.
Yes, the problem was python version and solved by installing python 3714
Thanks a lot.
Hi,
How Can I install another python version in gaia?
Why do you need to ? R81.10 latest version (SMS + GW) has:
Expert: python
Python 2.7.18 (default, Feb 2 2022, 17:14:32)
[GCC 6.3.0] on linux2
Expert: python3
Python 3.7.7 (default, Jun 25 2021, 16:31:08)
[GCC 6.3.0] on linux
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY