CodeIgniter Forums
[Solved] Unable to generate the documentation locally - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: [Solved] Unable to generate the documentation locally (/showthread.php?tid=75203)



[Solved] Unable to generate the documentation locally - littlej - 01-11-2020

Hello,

I am trying to generate the documentation locally on a Mac, but it seems I have versions conflicts. I am using the latest version of everything... I think it is because I use Sphinx 2.3.1 and requirements says "sphinx<2.3". Where do I change this ? Is it an issue with Sphinx, or sphinxcontrib-phpdomain, or your script ? I did not find any info on how to downgrade Sphinx on the internet. Any advice ?

Thank you !


CONSOLE OUPUT (make html)

Code:
Sphinx v2.3.1 en cours d'exécution
construction en cours [mo]:cibles pour les fichiers po 0 qui sont périmées
construction [html]:cibles pour les fichiers sources 142 qui sont périmées
mise-à-jour de l'environnement :[nouvelle configuration] 142 ajouté, 0 modifié, 0 supprimé
lecture des sources... [100%] tutorial/static_pages                                                                           
/Users/littlej/Projets/Github/CodeIgniter4/user_guide_src/source/libraries/caching.rst:83: WARNING: duplicate object description of get, other instance in /Users/littlej/Projets/Github/CodeIgniter4/user_guide_src/source/database/query_builder.rst
/Users/littlej/Projets/Github/CodeIgniter4/user_guide_src/source/libraries/caching.rst:115: WARNING: duplicate object description of delete, other instance in /Users/littlej/Projets/Github/CodeIgniter4/user_guide_src/source/database/query_builder.rst
/Users/littlej/Projets/Github/CodeIgniter4/user_guide_src/source/libraries/caching.rst:128: WARNING: duplicate object description of increment, other instance in /Users/littlej/Projets/Github/CodeIgniter4/user_guide_src/source/database/query_builder.rst
/Users/littlej/Projets/Github/CodeIgniter4/user_guide_src/source/libraries/caching.rst:145: WARNING: duplicate object description of decrement, other instance in /Users/littlej/Projets/Github/CodeIgniter4/user_guide_src/source/database/query_builder.rst
/Users/littlej/Projets/Github/CodeIgniter4/user_guide_src/source/testing/overview.rst:13: WARNING: Title overline too short.

************
System Set Up
************
recherche des fichiers périmés... aucun résultat
environnement de sérialisation... fait
vérification de la cohérence... fait
document en préparation... fait
écriture... [ 10%] cli/cli                                                                                                   
Une exception a été levée :
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (Sphinx 2.3.1 (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages), Requirement.parse('sphinx<2.3,>=1.3'), {'sphinxcontrib-phpdomain'})
Le traceback complet a été sauvé dans /var/folders/l5/t35cs_2d3wqbs_5gcxlqm1th0000gn/T/sphinx-err-mfx74rna.log, au cas où vous souhaiteriez signaler le problème aux développeurs.



CONSOLE LOG

Code:
# Sphinx version: 2.3.1
# Python version: 3.8.1 (CPython)
# Docutils version: 0.15.2 release
# Jinja2 version: 2.10.3
# Last messages:
#   écriture... [  4%] changelogs/v4.0.0-alpha.4
#   écriture... [  4%] changelogs/v4.0.0-alpha.5
#   écriture... [  5%] changelogs/v4.0.0-beta.1
#   écriture... [  6%] changelogs/v4.0.0-beta.2
#   écriture... [  7%] changelogs/v4.0.0-beta.3
#   écriture... [  7%] changelogs/v4.0.0-beta.4
#   écriture... [  8%] changelogs/v4.0.0-rc.1
#   écriture... [  9%] changelogs/v4.0.0-rc.2
#   écriture... [  9%] changelogs/v4.0.0-rc.3
#   écriture... [ 10%] cli/cli
# Loaded extensions:
#   sphinx.ext.mathjax (2.3.1) from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx/ext/$
#   sphinxcontrib.applehelp (1.0.1) from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx$
#   sphinxcontrib.devhelp (1.0.1) from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinxco$
#   sphinxcontrib.htmlhelp (1.0.2) from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinxc$
#   sphinxcontrib.serializinghtml (1.1.3) from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/$
#   sphinxcontrib.qthelp (1.0.2) from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinxcon$
#   alabaster (0.7.12) from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/alabaster/__init__.$
#   sphinx.ext.ifconfig (2.3.1) from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx/ext$
#   sphinxcontrib.phpdomain (2.3.1) from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx$
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx/cmd/build.py", line 276, in buil$
    app.build(args.force_all, filenames)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx/application.py", line 353, in bu$
    self.builder.build_update()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 297,$
    self.build(to_build,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 361,$
    self.write(docnames, list(updated_docnames), method)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 535,$
    self._write_serial(sorted(docnames))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 545,$
    self.write_doc(docname, doctree)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx/builders/html.py", line 616, in $
    self.docwriter.write(doctree, destination)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/docutils/writers/__init__.py", line 78,$
    self.translate()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sphinx/writers/html.py", line 58, in tr$
    self.document.walkabout(visitor)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/docutils/nodes.py", line 178, in walkab$
    if child.walkabout(visitor):



RE: Unable to generate the documentation locally - littlej - 01-17-2020

UUUUPPPP :-) I want to help with the documentation but I can't :-(

80+ views, not even a clue ? :-)


RE: Unable to generate the documentation locally - littlej - 01-20-2020

For those who may encounter this issue later, I solved the problem by uninstalling Sphinx and reinstalling an old version (using PIP).

Step 1: Uninstall
Code:
pip uninstall sphinx

Step 2: Installation of the most recent compatible version

Code:
pip install sphinx==2.2



RE: [Solved] Unable to generate the documentation locally - MGatner - 01-20-2020

Thanks for posting the solution! This will be helping tracking down the issue.