[ovs-discuss] Sphinx: SyntaxError: unqualified exec is not allowed in function 'run'

Paul Greenberg greenpau at outlook.com
Fri Sep 14 19:36:28 UTC 2018


The associated bug is: https://github.com/sphinx-doc/sphinx/issues/5417


The way I overcame this is by forcing an older version of sphinx.

pip uinstall sphinx
pip install sphinx==1.7.9



From: ovs-discuss-bounces at openvswitch.org <ovs-discuss-bounces at openvswitch.org> on behalf of Paul Greenberg <greenpau at outlook.com>
Sent: Friday, September 14, 2018 3:32 PM
To: bugs at openvswitch.org
Subject: [ovs-discuss] Sphinx: SyntaxError: unqualified exec is not allowed in function 'run'
 
During "make", I run into the following issue.

# make
make  all-recursive
make[1]: Entering directory `/root/github.com/openvswitch/ovs'
Making all in datapath
make[2]: Entering directory `/root/github.com/openvswitch/ovs/datapath'
make[3]: Entering directory `/root/github.com/openvswitch/ovs/datapath'
make[3]: Leaving directory `/root/github.com/openvswitch/ovs/datapath'
make[2]: Leaving directory `/root/github.com/openvswitch/ovs/datapath'
make[2]: Entering directory `/root/github.com/openvswitch/ovs'
make[3]: Entering directory `/root/github.com/openvswitch/ovs/datapath'
make[3]: `distfiles' is up to date.
make[3]: Leaving directory `/root/github.com/openvswitch/ovs/datapath'
sphinx-build  -b html -W -n -d ./Documentation/_build/doctrees  ./Documentation ./Documentation/_build/html && touch docs-check
Running Sphinx v1.8.0

Exception occurred:
  File "/usr/lib/python2.7/site-packages/sphinx/highlighting.py", line 26, in <module>
    from sphinx.ext import doctest
SyntaxError: unqualified exec is not allowed in function 'run' it contains a nested function with free variables (doctest.py, line 97)
The full traceback has been saved in /tmp/sphinx-err-OOGi8u.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[2]: *** [docs-check] Error 2
make[2]: Leaving directory `/root/github.com/openvswitch/ovs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/github.com/openvswitch/ovs'
make: *** [all] Error 2


The content of /tmp/sphinx-err-OOGi8u.log:

# Sphinx version: 1.8.0
# Python version: 2.7.5 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sphinx/cmd/build.py", line 303, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 224, in __init__
    self.setup_extension(extension)
  File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 449, in setup_extension
    self.registry.load_extension(self, extname)
  File "/usr/lib/python2.7/site-packages/sphinx/registry.py", line 472, in load_extension
    mod = __import__(extname, None, None, ['setup'])
  File "/usr/lib/python2.7/site-packages/sphinx/builders/applehelp.py", line 20, in <module>
    from sphinx.builders.html import StandaloneHTMLBuilder
  File "/usr/lib/python2.7/site-packages/sphinx/builders/html.py", line 40, in <module>
    from sphinx.highlighting import PygmentsBridge
  File "/usr/lib/python2.7/site-packages/sphinx/highlighting.py", line 26, in <module>
    from sphinx.ext import doctest
SyntaxError: unqualified exec is not allowed in function 'run' it contains a nested function with free variables (doctest.py, line 97)
_______________________________________________
discuss mailing list
discuss at openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


More information about the discuss mailing list