conan-io / conan-io/docs

autodoc: failed to import class 'conan_api.ConanAPI' from module 'conan.api'

Open
#3,627 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
125
Forks
382
Avg merge
22h 39m
Merged PRs (30d)
21

Description

### Problem Description

I tried to build the docs locally, but failed with the following warning messages:

```bash
Warning, treated as error:
autodoc: failed to import class 'conan_api.ConanAPI' from module 'conan.api'; the following exception was raised:
No module named 'colorama'
```

### Versions and Platforms

* OS version: Kubuntu 22.04
* Python version: `3.10.12`
* Docs repo:
* Branch: `develop2`
* Commit: [`44fc808a33d2b6dd80db8bd2e2cdfc93a6c7c335`](https://github.com/conan-io/docs/commit/44fc808a33d2b6dd80db8bd2e2cdfc93a6c7c335)
* Conan repo:
* Branch: `develop2`
* Commit: [`b0a82d21d346eb1da1ae919fbc32275bad98f265`](https://github.com/conan-io/conan/commit/b0a82d21d346eb1da1ae919fbc32275bad98f265)

### Steps to Reproduce

```bash
git clone --branch=develop2 --depth=1 https://github.com/conan-io/docs.git
cd docs
git clone --branch=develop2 --depth=1 https://github.com/conan-io/conan.git conan_sources
python3 -m venv .venv
source ./.venv/bin/activate
pip install -r requirements.txt
LANG=en_US.UTF-8 make html
git rev-parse HEAD
cd conan_sources
git rev-parse HEAD
```

### Logs

Click to expand the full log

```bash
hwhsu1231@vb-kubuntu:~/Repo$ git clone --branch=develop2 --depth=1 https://github.com/conan-io/docs.git
Cloning into 'docs'...
remote: Enumerating objects: 472, done.
remote: Counting objects: 100% (472/472), done.
remote: Compressing objects: 100% (449/449), done.
remote: Total 472 (delta 5), reused 283 (delta 2), pack-reused 0
Receiving objects: 100% (472/472), 6.91 MiB | 3.03 MiB/s, done.
Resolving deltas: 100% (5/5), done.
hwhsu1231@vb-kubuntu:~/Repo$ cd docs
hwhsu1231@vb-kubuntu:~/Repo/docs$ git clone --branch=develop2 --depth=1 https://github.com/conan-io/conan.git conan_sources
Cloning into 'conan_sources'...
remote: Enumerating objects: 1053, done.
remote: Counting objects: 100% (1053/1053), done.
remote: Compressing objects: 100% (1028/1028), done.
remote: Total 1053 (delta 23), reused 609 (delta 10), pack-reused 0
Receiving objects: 100% (1053/1053), 1.27 MiB | 2.23 MiB/s, done.
Resolving deltas: 100% (23/23), done.
hwhsu1231@vb-kubuntu:~/Repo/docs$ python3 -m venv .venv
hwhsu1231@vb-kubuntu:~/Repo/docs$ source ./.venv/bin/activate
(.venv) hwhsu1231@vb-kubuntu:~/Repo/docs$ pip install -r requirements.txt
Collecting sphinx==7.2.6
Using cached sphinx-7.2.6-py3-none-any.whl (3.2 MB)
Collecting sphinx-sitemap==2.5.1
Downloading sphinx_sitemap-2.5.1-py3-none-any.whl (5.5 kB)
Collecting sphinxcontrib-spelling==8.0.0
Downloading sphinxcontrib_spelling-8.0.0-py3-none-any.whl (16 kB)
Collecting sphinx-notfound-page==1.0.0
Downloading sphinx_notfound_page-1.0.0-py3-none-any.whl (8.1 kB)
Collecting sphinxcontrib-jquery==4.1
Downloading sphinxcontrib_jquery-4.1-py2.py3-none-any.whl (121 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.1/121.1 KB 900.7 kB/s eta 0:00:00
Collecting sphinxcontrib-youtube==1.4.1
Downloading sphinxcontrib_youtube-1.4.1-py2.py3-none-any.whl (6.5 kB)
Collecting docutils==0.20.1
Using cached docutils-0.20.1-py3-none-any.whl (572 kB)
Collecting jinja2==3.1.3
Downloading Jinja2-3.1.3-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.2/133.2 KB 2.5 MB/s eta 0:00:00
Collecting watchdog[watchmedo]==2.2.0
Downloading watchdog-2.2.0-py3-none-manylinux2014_x86_64.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.7/78.7 KB 1.4 MB/s eta 0:00:00
Collecting sphinxcontrib-htmlhelp>=2.0.0
Using cached sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl (99 kB)
Collecting Pygments>=2.14
Downloading pygments-2.17.2-py3-none-any.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 3.0 MB/s eta 0:00:00
Collecting sphinxcontrib-applehelp
Using cached sphinxcontrib_applehelp-1.0.8-py3-none-any.whl (120 kB)
Collecting imagesize>=1.3
Using cached imagesize-1.4.1-py2.py3-none-any.whl (8.8 kB)
Collecting sphinxcontrib-serializinghtml>=1.1.9
Using cached sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl (92 kB)
Collecting sphinxcontrib-jsmath
Using cached sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Collecting sphinxcontrib-devhelp
Using cached sphinxcontrib_devhelp-1.0.6-py3-none-any.whl (83 kB)
Collecting packaging>=21.0
Downloading packaging-24.0-py3-none-any.whl (53 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.5/53.5 KB 2.5 MB/s eta 0:00:00
Collecting sphinxcontrib-qthelp
Using cached sphinxcontrib_qthelp-1.0.7-py3-none-any.whl (89 kB)
Collecting alabaster<0.8,>=0.7
Using cached alabaster-0.7.16-py3-none-any.whl (13 kB)
Collecting snowballstemmer>=2.0
Using cached snowballstemmer-2.2.0-py2.py3-none-any.whl (93 kB)
Collecting requests>=2.25.0
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting babel>=2.9
Using cached Babel-2.14.0-py3-none-any.whl (11.0 MB)
Collecting PyEnchant>=3.1.1
Downloading pyenchant-3.2.2-py3-none-any.whl (55 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.7/55.7 KB 2.4 MB/s eta 0:00:00
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting PyYAML>=3.10
Downloading PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (705 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 705.5/705.5 KB 2.5 MB/s eta 0:00:00
Collecting urllib3<3,>=1.21.1
Downloading urllib3-2.2.1-py3-none-any.whl (121 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.1/121.1 KB 2.3 MB/s eta 0:00:00
Collecting certifi>=2017.4.17
Downloading certifi-2024.2.2-py3-none-any.whl (163 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.8/163.8 KB 2.8 MB/s eta 0:00:00
Collecting charset-normalizer<4,>=2
Downloading charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 142.1/142.1 KB 2.8 MB/s eta 0:00:00
Collecting idna<4,>=2.5
Downloading idna-3.6-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 KB 1.9 MB/s eta 0:00:00
Installing collected packages: snowballstemmer, watchdog, urllib3, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, PyYAML, Pygments, PyEnchant, packaging, MarkupSafe, imagesize, idna, docutils, charset-normalizer, certifi, babel, alabaster, requests, jinja2, sphinx, sphinxcontrib-youtube, sphinxcontrib-spelling, sphinxcontrib-jquery, sphinx-sitemap, sphinx-notfound-page
Successfully installed MarkupSafe-2.1.5 PyEnchant-3.2.2 PyYAML-6.0.1 Pygments-2.17.2 alabaster-0.7.16 babel-2.14.0 certifi-2024.2.2 charset-normalizer-3.3.2 docutils-0.20.1 idna-3.6 imagesize-1.4.1 jinja2-3.1.3 packaging-24.0 requests-2.31.0 snowballstemmer-2.2.0 sphinx-7.2.6 sphinx-notfound-page-1.0.0 sphinx-sitemap-2.5.1 sphinxcontrib-applehelp-1.0.8 sphinxcontrib-devhelp-1.0.6 sphinxcontrib-htmlhelp-2.0.5 sphinxcontrib-jquery-4.1 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.7 sphinxcontrib-serializinghtml-1.1.10 sphinxcontrib-spelling-8.0.0 sphinxcontrib-youtube-1.4.1 urllib3-2.2.1 watchdog-2.2.0
(.venv) hwhsu1231@vb-kubuntu:~/Repo/docs$ LANG=en_US.UTF-8 make html
sphinx-build -W -b html -d _build/doctrees . _build/html
Running Sphinx v7.2.6
Initializing Spelling Checker 8.0.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 275 source files that are out of date
updating environment: [new config] 275 added, 0 changed, 0 removed
direct use of the spelling directive is deprecated, replace ".. spelling::" with ".. spelling:word-list::"
reading sources... [100%] whatsnew
sphinx-sitemap: No pages generated for sitemap.xml

Warning, treated as error:
autodoc: failed to import class 'conan_api.ConanAPI' from module 'conan.api'; the following exception was raised:
No module named 'colorama'
make: *** [Makefile:57: html] Error 2
(.venv) hwhsu1231@vb-kubuntu:~/Repo/docs$ git rev-parse HEAD
44fc808a33d2b6dd80db8bd2e2cdfc93a6c7c335
(.venv) hwhsu1231@vb-kubuntu:~/Repo/docs$ cd conan_sources
(.venv) hwhsu1231@vb-kubuntu:~/Repo/docs/conan_sources$ git rev-parse HEAD
b0a82d21d346eb1da1ae919fbc32275bad98f265
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.