Discussion:
[Docutils-users] RST documentation for BRO
Andrew V. Stepanov
2015-01-27 13:07:06 UTC
Permalink
Hello.

I need to make RPM package for BRO.

https://www.bro.org/

I need to run in SPEC file: make doc

But it fails with:

Running Sphinx v1.3a0
loading pickled environment... not yet created
building [html]: targets for 422 source files that are out of date
updating environment: 422 added, 0 changed, 0 removed
reading sources... [ 0%] broids/index
running test doc/sphinx/ftp-bruteforce.btest ...
reading sources... [ 0%] cluster/index
reading sources... [ 0%] components/binpac/README

Exception occurred:
File "/usr/lib/python2.7/site-packages/pygments/lexers/__init__.py",
line 252, in guess_lexer
raise ClassNotFound('no lexer matching the text found')
ClassNotFound: no lexer matching the text found
The full traceback has been saved in /usr/src/tmp/sphinx-err-5Cm0Xi.log,
if you want to report the issue to the developers.


Contents of /usr/src/tmp/sphinx-err-5Cm0Xi.log is:


# Sphinx version: 1.3a0
# Python version: 2.7.8
# Docutils version: 0.13 repository
# Jinja2 version: 2.8-dev
# Loaded extensions:
# rst_directive from
/usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/rst_directive.py
# bro from /usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/bro.py
# adapt-toc from
/usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/adapt-toc.py
# sphinx.ext.todo from
/usr/lib/python2.7/site-packages/sphinx/ext/todo.pyc
# broxygen from
/usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/broxygen.py
# btest-sphinx from
/usr/src/RPM/BUILD/bro-2.3.1/aux/btest/sphinx/btest-sphinx.pyc
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/sphinx/cmdline.py", line 254,
in main
app.build(force_all, filenames)
File "/usr/lib/python2.7/site-packages/sphinx/application.py", line
215, in build
self.builder.build_update()
File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py",
line 214, in build_update
'out of date' % len(to_build))
File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py",
line 234, in build
purple, length):
File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py",
line 134, in status_iterator
for item in iterable:
File "/usr/lib/python2.7/site-packages/sphinx/environment.py", line
474, in update_generator
self.read_doc(docname, app=app)
File "/usr/lib/python2.7/site-packages/sphinx/environment.py", line
621, in read_doc
pub.publish()
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 217,
in publish
self.settings)
File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py",
line 72, in read
self.parse()
File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py",
line 78, in parse
self.parser.parse(self.input, document)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py",
line 172, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
170, in run
input_source=document['source'])
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2961, in text
self.section(title.lstrip(), source, style, lineno + 1, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
327, in section
self.new_subsection(title, lineno, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
395, in new_subsection
node=section_node, match_titles=True)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
282, in nested_parse
node=node, match_titles=match_titles)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2726, in underline
self.section(title, source, style, lineno - 1, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
327, in section
self.new_subsection(title, lineno, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
395, in new_subsection
node=section_node, match_titles=True)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
282, in nested_parse
node=node, match_titles=match_titles)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2726, in underline
self.section(title, source, style, lineno - 1, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
327, in section
self.new_subsection(title, lineno, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
395, in new_subsection
node=section_node, match_titles=True)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
282, in nested_parse
node=node, match_titles=match_titles)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2726, in underline
self.section(title, source, style, lineno - 1, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
327, in section
self.new_subsection(title, lineno, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
395, in new_subsection
node=section_node, match_titles=True)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
282, in nested_parse
node=node, match_titles=match_titles)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2299, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2311, in explicit_construct
return method(self, expmatch)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2054, in directive
directive_class, match, type_name, option_presets)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2103, in run_directive
result = directive_instance.run()
File
"/usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/rst_directive.py",
line 138, in run
lexer = guess_lexer(content)
File "/usr/lib/python2.7/site-packages/pygments/lexers/__init__.py",
line 252, in guess_lexer
raise ClassNotFound('no lexer matching the text found')
ClassNotFound: no lexer matching the text found

$ rpm -q python-module-docutils
python-module-docutils-0.13-alt1.svn20140708


https://github.com/bro/bro/tree/master/doc/components/binpac
https://github.com/bro/binpac/blob/master/README

Could you please help me ?





------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
David Goodger
2015-01-27 15:29:23 UTC
Permalink
I'm afraid there's not enough information there to help you much. The
setup is using Sphinx, which uses Docutils, which uses Pygments. It
doesn't seem to be a Docutils issue.

Pygments raises an exception: "ClassNotFound: no lexer matching the
text found". Unfortunately it doesn't tell you *what* text was found,
or where. Pygments does code formatting/styling. I suspect that you're
missing a formatter/styler for the specific language that Pygments is
trying to process. In other words, you may be missing a piece of
software (maybe a Pygments plugin) that is required.

The output doesn't tell you what file it was processing when the error
occurred. That would be useful information.

I'm not willing to download all the bits & pieces to try to guess
what's missing. Perhaps someone on the BRO or Pygments development
teams can help you out.

-- David Goodger
Post by Andrew V. Stepanov
Hello.
I need to make RPM package for BRO.
https://www.bro.org/
I need to run in SPEC file: make doc
Running Sphinx v1.3a0
loading pickled environment... not yet created
building [html]: targets for 422 source files that are out of date
updating environment: 422 added, 0 changed, 0 removed
reading sources... [ 0%] broids/index
running test doc/sphinx/ftp-bruteforce.btest ...
reading sources... [ 0%] cluster/index
reading sources... [ 0%] components/binpac/README
File "/usr/lib/python2.7/site-packages/pygments/lexers/__init__.py",
line 252, in guess_lexer
raise ClassNotFound('no lexer matching the text found')
ClassNotFound: no lexer matching the text found
The full traceback has been saved in /usr/src/tmp/sphinx-err-5Cm0Xi.log,
if you want to report the issue to the developers.
# Sphinx version: 1.3a0
# Python version: 2.7.8
# Docutils version: 0.13 repository
# Jinja2 version: 2.8-dev
# rst_directive from
/usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/rst_directive.py
# bro from /usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/bro.py
# adapt-toc from
/usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/adapt-toc.py
# sphinx.ext.todo from
/usr/lib/python2.7/site-packages/sphinx/ext/todo.pyc
# broxygen from
/usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/broxygen.py
# btest-sphinx from
/usr/src/RPM/BUILD/bro-2.3.1/aux/btest/sphinx/btest-sphinx.pyc
File "/usr/lib/python2.7/site-packages/sphinx/cmdline.py", line 254,
in main
app.build(force_all, filenames)
File "/usr/lib/python2.7/site-packages/sphinx/application.py", line
215, in build
self.builder.build_update()
File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py",
line 214, in build_update
'out of date' % len(to_build))
File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py",
line 234, in build
File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py",
line 134, in status_iterator
File "/usr/lib/python2.7/site-packages/sphinx/environment.py", line
474, in update_generator
self.read_doc(docname, app=app)
File "/usr/lib/python2.7/site-packages/sphinx/environment.py", line
621, in read_doc
pub.publish()
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 217,
in publish
self.settings)
File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py",
line 72, in read
self.parse()
File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py",
line 78, in parse
self.parser.parse(self.input, document)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py",
line 172, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
170, in run
input_source=document['source'])
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2961, in text
self.section(title.lstrip(), source, style, lineno + 1, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
327, in section
self.new_subsection(title, lineno, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
395, in new_subsection
node=section_node, match_titles=True)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
282, in nested_parse
node=node, match_titles=match_titles)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2726, in underline
self.section(title, source, style, lineno - 1, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
327, in section
self.new_subsection(title, lineno, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
395, in new_subsection
node=section_node, match_titles=True)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
282, in nested_parse
node=node, match_titles=match_titles)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2726, in underline
self.section(title, source, style, lineno - 1, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
327, in section
self.new_subsection(title, lineno, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
395, in new_subsection
node=section_node, match_titles=True)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
282, in nested_parse
node=node, match_titles=match_titles)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2726, in underline
self.section(title, source, style, lineno - 1, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
327, in section
self.new_subsection(title, lineno, messages)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
395, in new_subsection
node=section_node, match_titles=True)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
282, in nested_parse
node=node, match_titles=match_titles)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
context, state, transitions)
File "/usr/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2299, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2311, in explicit_construct
return method(self, expmatch)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2054, in directive
directive_class, match, type_name, option_presets)
File
"/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line
2103, in run_directive
result = directive_instance.run()
File
"/usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/rst_directive.py",
line 138, in run
lexer = guess_lexer(content)
File "/usr/lib/python2.7/site-packages/pygments/lexers/__init__.py",
line 252, in guess_lexer
raise ClassNotFound('no lexer matching the text found')
ClassNotFound: no lexer matching the text found
$ rpm -q python-module-docutils
python-module-docutils-0.13-alt1.svn20140708
https://github.com/bro/bro/tree/master/doc/components/binpac
https://github.com/bro/binpac/blob/master/README
Could you please help me ?
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Docutils-users mailing list
https://lists.sourceforge.net/lists/listinfo/docutils-users
Please use "Reply All" to reply to the list.
--
David Goodger <http://python.net/~goodger>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Andrew V. Stepanov
2015-01-28 09:17:37 UTC
Permalink
Post by David Goodger
I'm not willing to download all the bits & pieces to try to guess
what's missing. Perhaps someone on the BRO or Pygments development
teams can help you out.
-- David Goodger
Thank you. BRO developer helped me )

Commit is
https://github.com/bro/bro/commit/36bc7ba5b5d25cea881db22fb1a5bc2bc5fbc3e4
Loading...