| [fwtools] fwdoc_to_* filter problems | |
| From: | Javi |
| Date: | Fri, 15 Jun 2007 14:13:34 +0200 |
------=_Part_64456_7517812.1181909614873
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,
I was glad when finding this tool, because it is exactly what I was needing,
but I have still not been able to obtain a correct output file.
After running fw1r55_to_fwdoc I obtain an aparently correct file:
-------------
>perl fw1r55_to_fwdoc.pl --objects=_config\objects_5_0.C
--merge_ai=_config\rulebases_5_0.fws
--rules=_config\policy.W --verbose > policy.fwdoc
(....)
skipping....
Reading Done.
Printing ruleset to FWdoc into STDOUT.
Done.
----------------
but when I run any python filter, for example:
>type ..\fw1r55_to_fwdoc\policy.fwdoc |
..\..\python\python fwdoc_to_html.py > policy.html
I get these errors:
--------------
Traceback (most recent call last):
File "fwdoc_to_html.py", line 46, in ?
fwdoc = json.read(fwdoctxt)
File "G:\software\fwdoc\fwdoc_to_html\json.py", line 311, in read
return JsonReader().read(s)
File "G:\software\fwdoc\fwdoc_to_html\json.py", line 55, in read
result = self._read()
File "G:\software\fwdoc\fwdoc_to_html\json.py", line 64, in _read
return self._readObject()
File "G:\software\fwdoc\fwdoc_to_html\json.py", line 222, in _readObject
val = self._read()
File "G:\software\fwdoc\fwdoc_to_html\json.py", line 66, in _read
return self._readArray()
File "G:\software\fwdoc\fwdoc_to_html\json.py", line 198, in _readArray
item = self._read()
File "G:\software\fwdoc\fwdoc_to_html\json.py", line 64, in _read
return self._readObject()
File "G:\software\fwdoc\fwdoc_to_html\json.py", line 229, in _readObject
raise ReadException, "Not a valid JSON array: '%s' due to: '%s'" %
(self._ge
nerator.all(), ch)
json.ReadException: Not a valid JSON array: '{
------------
And an empty policy.html file is generated.I get same result in Windows and
Linux.
Maybe I'm doing something wrong? or it could be a fwdoc bug?
Thanks
------=_Part_64456_7517812.1181909614873
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,
I was
glad when finding this tool, because it is exactly what I was needing, but I
have still not been able to obtain a correct output file.
After
running fw1r55_to_fwdoc I obtain an aparently correct file:
-------------
>perl
fw1r55_to_fwdoc.pl --objects=_config\objects_5_0.C
--merge_ai=_config\rulebases_5_0.fws
--rules=_config\policy.W
--verbose > policy.fwdoc
(....)
skipping....
Reading
Done.
Printing
ruleset to FWdoc into STDOUT.
Done.
----------------
but when
I run any python filter, for example:
>type
..\fw1r55_to_fwdoc\policy.fwdoc |
..\..\python\python
fwdoc_to_html.py > policy.html
I get
these errors:
--------------
Traceback
(most recent call last):
File "fwdoc_to_html.py", line 46,
in ?
fwdoc = json.read(fwdoctxt)
File
"G:\software\fwdoc\fwdoc_to_html\json.py", line 311, in read
return JsonReader().read(s)
File
"G:\software\fwdoc\fwdoc_to_html\json.py", line 55, in read
result = self._read()
File "G:\software\fwdoc\fwdoc_to_html\json.py",
line 64, in _read
return self._readObject()
File
"G:\software\fwdoc\fwdoc_to_html\json.py", line 222, in _readObject
val = self._read()
File
"G:\software\fwdoc\fwdoc_to_html\json.py", line 66, in _read
return self._readArray()
File
"G:\software\fwdoc\fwdoc_to_html\json.py", line 198, in _readArray
item = self._read()
File
"G:\software\fwdoc\fwdoc_to_html\json.py", line 64, in _read
return self._readObject()
File
"G:\software\fwdoc\fwdoc_to_html\json.py", line 229, in _readObject
raise ReadException, "Not a valid JSON
array: '%s' due to: '%s'" % (self._ge
nerator.all(),
ch)
json.ReadException:
Not a valid JSON array: '{
------------
And an
empty policy.html file is generated.I get same result in Windows and Linux.
Maybe I'm
doing something wrong? or it could be a fwdoc bug?
Thanks
------=_Part_64456_7517812.1181909614873--