WYAE - FWTOOLS Mailing List Archive
| Python Errors in conversion script
|
| From: | "Jeff Wardlaw" |
| Date: | Fri, 30 Nov 2007 09:39:53 -0500
|
Hi,
I successfully converted my fw1 config to fwdoc. However, the remaining =
conversion scripts seem to fail with a Python error: "KeyError: 'A'". I've =
tried it with native python for windows, cygwin, and debian.
Here is the error:
$ cat cmc.fwdoc | ./fwdoc_to_html/fwdoc_to_html.py > cmc.fwdoc.html
Traceback (most recent call last):
File "./fwdoc_to_html/fwdoc_to_html.py", line 302, in
print "
%s
"=
% (fwdoc
['objects'][r]['type'], r, r)
KeyError: 'A'
I tried commenting out line 301 and 302, but then the error just moves =
down to the next section that has the same call.
Here's the line in the script that I commented out first:
#for r in rule['orig_from']:
# print "
%s<=
br/>" % (fwdoc['objects'][r]['type'], r, r)
Here's the same error, after I commented out offending lines a couple =
times:
Original error:
$ cat cmc.fwdoc | ./fwdoc_to_html/fwdoc_to_html.py > cmc.fwdoc.html
Traceback (most recent call last):
File "./fwdoc_to_html/fwdoc_to_html.py", line 302, in
print "
%s
"=
% (fwdoc
['objects'][r]['type'], r, r)
KeyError: 'A'
Comment out Lines 301 & 302:
jcw@machiavelli /cygdrive/d/bin/fwdoc
$ cat cmc.fwdoc | ./fwdoc_to_html/fwdoc_to_html.py > cmc.fwdoc.html
Traceback (most recent call last):
File "./fwdoc_to_html/fwdoc_to_html.py", line 310, in
print "
%s
"=
% (fwdoc
['services'][r]['type'], r, r)
KeyError: 'A'
Comment out Lines 301, 302, 309, 310:
jcw@machiavelli /cygdrive/d/bin/fwdoc
$ cat cmc.fwdoc | ./fwdoc_to_html/fwdoc_to_html.py > cmc.fwdoc.html
Traceback (most recent call last):
File "./fwdoc_to_html/fwdoc_to_html.py", line 312, in
print "%s %s | " %
(natprefix, fwdoc['objects'][rule['nat_from']]['type'], rule['nat_from'],r=
ule['
nat_from'])
KeyError: '24.39.92.156'
Thank you for any help.
-Jeff
--=20
Jeff Wardlaw
Network Engineer
The Computing Center
607-257-3524 x125
jcw@compcenter.com
www.compcenter.com