Open hwhsu1231 opened 1 year ago
Hi @hwhsu1231
Yes, autodocs needs to have the conan sources in the PYTHONPATH
, that's what is failing.
Please, clone the sources from the conan repository, checkout the conan release/2.0 branch add that folder to the PYTHONPATH
and try again.
Hope this helps.
Hi @hwhsu1231 Yes, autodocs needs to have the conan sources in the
PYTHONPATH
, that's what is failing. Please, clone the sources from the conan repository, checkout the conan release/2.0 branch add that folder to thePYTHONPATH
and try again. Hope this helps.
Still not working?
I think the problem comes because you are putting the conan docs in the PYTHONPATH, but you have to put the conan sources. You can also have an updated version of conan installed in you environment, I think you have one outdated version. Try to do pip install conan --upgrade
and make the docs again.
OK, it works after upgrading the Conan package!
I have a question. Does it mean that we had better install the latest release of Conan 2.X.Y
if we want to build the corresponding release/2.X
branch of Conan-Docs?
I have a question. Does it mean that we had better install the latest release of Conan
2.X.Y
if we want to build the correspondingrelease/2.X
branch of Conan-Docs?
Yes, that's it, release/2.0 is related with the latest Conan release, and autodoc needs the sources to complete the docs.
Problem Description
I tried to build the documentation of
release/2.0
branch. The following commands are the demo:However, the error showed up:
Version and Platform
OS version:
Windows 11
Python version:
3.10.7
Conan version:
2.0.2
Conan-Docs version:
release/2.0
22959e53aded1cdc78d41998831e04470f7b5391
Requirements:
Click to expand requirements
``` Requirement already satisfied: sphinx==1.7.9 in c:\python\python310\lib\site-packages (from -r requirements.txt (line 1)) (1.7.9) Requirement already satisfied: docutils<0.18 in c:\python\python310\lib\site-packages (from -r requirements.txt (line 2)) (0.17.1) Requirement already satisfied: sphinx-sitemap>=2.1.0 in c:\python\python310\lib\site-packages (from -r requirements.txt (line 3)) (2.5.0) Requirement already satisfied: sphinxcontrib-spelling in c:\python\python310\lib\site-packages (from -r requirements.txt (line 4)) (4.2.1) Requirement already satisfied: sphinx-notfound-page in c:\python\python310\lib\site-packages (from -r requirements.txt (line 5)) (0.8) Requirement already satisfied: jinja2<=3.0.3 in c:\python\python310\lib\site-packages (from -r requirements.txt (line 6)) (3.0.0) Requirement already satisfied: watchdog[watchmedo]==2.2.0 in c:\python\python310\lib\site-packages (from -r requirements.txt (line 7)) (2.2.0) Requirement already satisfied: six>=1.5 in c:\users\hwhsu1231\appdata\roaming\python\python310\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (1.16.0) Requirement already satisfied: Pygments>=2.0 in c:\users\hwhsu1231\appdata\roaming\python\python310\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (2.14.0) Requirement already satisfied: snowballstemmer>=1.1 in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (2.2.0) Requirement already satisfied: babel!=2.0,>=1.3 in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (2.11.0) Requirement already satisfied: alabaster<0.8,>=0.7 in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (0.7.12) Requirement already satisfied: imagesize in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (1.4.1) Requirement already satisfied: requests>=2.0.0 in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (2.28.1) Requirement already satisfied: setuptools in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (59.8.0) Requirement already satisfied: packaging in c:\users\hwhsu1231\appdata\roaming\python\python310\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (23.0) Requirement already satisfied: sphinxcontrib-websupport in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (1.2.4) Requirement already satisfied: colorama>=0.3.5 in c:\users\hwhsu1231\appdata\roaming\python\python310\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (0.4.6) Requirement already satisfied: PyYAML>=3.10 in c:\python\python310\lib\site-packages (from watchdog[watchmedo]==2.2.0->-r requirements.txt (line 7)) (6.0) Requirement already satisfied: PyEnchant>=1.6.5 in c:\python\python310\lib\site-packages (from sphinxcontrib-spelling->-r requirements.txt (line 4)) (3.2.2) Requirement already satisfied: MarkupSafe>=2.0.0rc2 in c:\python\python310\lib\site-packages (from jinja2<=3.0.3->-r requirements.txt (line 6)) (2.1.1) Requirement already satisfied: pytz>=2015.7 in c:\python\python310\lib\site-packages (from babel!=2.0,>=1.3->sphinx==1.7.9->-r requirements.txt (line 1)) (2022.6) Requirement already satisfied: charset-normalizer<3,>=2 in c:\python\python310\lib\site-packages (from requests>=2.0.0->sphinx==1.7.9->-r requirements.txt (line 1)) (2.1.1) Requirement already satisfied: idna<4,>=2.5 in c:\users\hwhsu1231\appdata\roaming\python\python310\site-packages (from requests>=2.0.0->sphinx==1.7.9->-r requirements.txt (line 1)) (2.8) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\python\python310\lib\site-packages (from requests>=2.0.0->sphinx==1.7.9->-r requirements.txt (line 1)) (1.26.12) Requirement already satisfied: certifi>=2017.4.17 in c:\python\python310\lib\site-packages (from requests>=2.0.0->sphinx==1.7.9->-r requirements.txt (line 1)) (2022.9.14) Requirement already satisfied: sphinxcontrib-serializinghtml in c:\python\python310\lib\site-packages (from sphinxcontrib-websupport->sphinx==1.7.9->-r requirements.txt (line 1)) (1.1.5) ```Logs
Click to expand logs
```cmd D:\Repo\GitHub\testing\docs>git branch develop * release/2.0 D:\Repo\GitHub\testing\docs>pip install -r requirements.txt Requirement already satisfied: sphinx==1.7.9 in c:\python\python310\lib\site-packages (from -r requirements.txt (line 1)) (1.7.9) Requirement already satisfied: docutils<0.18 in c:\python\python310\lib\site-packages (from -r requirements.txt (line 2)) (0.17.1) Requirement already satisfied: sphinx-sitemap>=2.1.0 in c:\python\python310\lib\site-packages (from -r requirements.txt (line 3)) (2.5.0) Requirement already satisfied: sphinxcontrib-spelling in c:\python\python310\lib\site-packages (from -r requirements.txt (line 4)) (4.2.1) Requirement already satisfied: sphinx-notfound-page in c:\python\python310\lib\site-packages (from -r requirements.txt (line 5)) (0.8) Requirement already satisfied: jinja2<=3.0.3 in c:\python\python310\lib\site-packages (from -r requirements.txt (line 6)) (3.0.0) Requirement already satisfied: watchdog[watchmedo]==2.2.0 in c:\python\python310\lib\site-packages (from -r requirements.txt (line 7)) (2.2.0) Requirement already satisfied: six>=1.5 in c:\users\hwhsu1231\appdata\roaming\python\python310\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (1.16.0) Requirement already satisfied: Pygments>=2.0 in c:\users\hwhsu1231\appdata\roaming\python\python310\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (2.14.0) Requirement already satisfied: snowballstemmer>=1.1 in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (2.2.0) Requirement already satisfied: babel!=2.0,>=1.3 in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (2.11.0) Requirement already satisfied: alabaster<0.8,>=0.7 in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (0.7.12) Requirement already satisfied: imagesize in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (1.4.1) Requirement already satisfied: requests>=2.0.0 in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (2.28.1) Requirement already satisfied: setuptools in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (59.8.0) Requirement already satisfied: packaging in c:\users\hwhsu1231\appdata\roaming\python\python310\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (23.0) Requirement already satisfied: sphinxcontrib-websupport in c:\python\python310\lib\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (1.2.4) Requirement already satisfied: colorama>=0.3.5 in c:\users\hwhsu1231\appdata\roaming\python\python310\site-packages (from sphinx==1.7.9->-r requirements.txt (line 1)) (0.4.6) Requirement already satisfied: PyYAML>=3.10 in c:\python\python310\lib\site-packages (from watchdog[watchmedo]==2.2.0->-r requirements.txt (line 7)) (6.0) Requirement already satisfied: PyEnchant>=1.6.5 in c:\python\python310\lib\site-packages (from sphinxcontrib-spelling->-r requirements.txt (line 4)) (3.2.2) Requirement already satisfied: MarkupSafe>=2.0.0rc2 in c:\python\python310\lib\site-packages (from jinja2<=3.0.3->-r requirements.txt (line 6)) (2.1.1) Requirement already satisfied: pytz>=2015.7 in c:\python\python310\lib\site-packages (from babel!=2.0,>=1.3->sphinx==1.7.9->-r requirements.txt (line 1)) (2022.6) Requirement already satisfied: charset-normalizer<3,>=2 in c:\python\python310\lib\site-packages (from requests>=2.0.0->sphinx==1.7.9->-r requirements.txt (line 1)) (2.1.1) Requirement already satisfied: idna<4,>=2.5 in c:\users\hwhsu1231\appdata\roaming\python\python310\site-packages (from requests>=2.0.0->sphinx==1.7.9->-r requirements.txt (line 1)) (2.8) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\python\python310\lib\site-packages (from requests>=2.0.0->sphinx==1.7.9->-r requirements.txt (line 1)) (1.26.12) Requirement already satisfied: certifi>=2017.4.17 in c:\python\python310\lib\site-packages (from requests>=2.0.0->sphinx==1.7.9->-r requirements.txt (line 1)) (2022.9.14) Requirement already satisfied: sphinxcontrib-serializinghtml in c:\python\python310\lib\site-packages (from sphinxcontrib-websupport->sphinx==1.7.9->-r requirements.txt (line 1)) (1.1.5) D:\Repo\GitHub\testing\docs>make html Running Sphinx v1.7.9 Initializing Spelling Checker making output directory... loading pickled environment... not yet created building [mo]: targets for 0 po files that are out of date building [html]: targets for 239 source files that are out of date updating environment: 239 added, 0 changed, 0 removed C:\Python\Python310\lib\site-packages\sphinx\util\nodes.py:57: FutureWarning: erprojecttsools_toolchain The iterable returned by Node.traverse() will become an iterator instead of a list in Docutils > 0.16. for classifier in reversed(node.parent.traverse(nodes.classifier)): C:\Python\Python310\lib\site-packages\sphinx\util\nodes.py:57: FutureWarning: The iterable returned by Node.traverse() will become an iterator instead of a list in Docutils > 0.16. for classifier in reversed(node.parent.traverse(nodes.classifier)): C:\Python\Python310\lib\site-packages\sphinx\util\nodes.py:57: FutureWarning: The iterable returned by Node.traverse() will become an iterator instead of a list in Docutils > 0.16. for classifier in reversed(node.parent.traverse(nodes.classifier)): C:\Python\Python310\lib\site-packages\sphinx\util\nodes.py:57: FutureWarning: The iterable returned by Node.traverse() will become an iterator instead of a list in Docutils > 0.16. for classifier in reversed(node.parent.traverse(nodes.classifier)): C:\Python\Python310\lib\site-packages\sphinx\util\nodes.py:57: FutureWarning: The iterable returned by Node.traverse() will become an iterator instead of a list in Docutils > 0.16. for classifier in reversed(node.parent.traverse(nodes.classifier)): C:\Python\Python310\lib\site-packages\sphinx\util\nodes.py:57: FutureWarning: ol_requires_packagesies_ce_cpp The iterable returned by Node.traverse() will become an iterator instead of a list in Docutils > 0.16. for classifier in reversed(node.parent.traverse(nodes.classifier)): reading sources... [100%] whatsnew t_flow sphinx-sitemap: No pages generated for sitemap.xml Warning, treated as error: autodoc: failed to import function 'trim_conandata' from module 'conan.tools.files.conandata'; the following exception was raised: Traceback (most recent call last): File "C:\Python\Python310\lib\site-packages\sphinx\util\inspect.py", line 222, in safe_getattr return getattr(obj, name, *defargs) AttributeError: module 'conan.tools.files.conandata' has no attribute 'trim_conandata' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python\Python310\lib\site-packages\sphinx\ext\autodoc\importer.py", line 176, in import_object obj = attrgetter(obj, attrname) File "C:\Python\Python310\lib\site-packages\sphinx\ext\autodoc\__init__.py", line 274, in get_attr return autodoc_attrgetter(self.env.app, obj, name, *defargs) File "C:\Python\Python310\lib\site-packages\sphinx\ext\autodoc\__init__.py", line 1514, in autodoc_attrgetter return safe_getattr(obj, name, *defargs) File "C:\Python\Python310\lib\site-packages\sphinx\util\inspect.py", line 238, in safe_getattr raise AttributeError(name) AttributeError: trim_conandata D:\Repo\GitHub\testing\docs> ```