InstituteforDiseaseModeling / covasim

COVID-19 Agent-based Simulator (Covasim): a model for exploring coronavirus dynamics and interventions
https://covasim.org
MIT License
255 stars 224 forks source link

covasim - local doc build failing (make html) #408

Closed RCarter-IDM closed 11 months ago

RCarter-IDM commented 1 year ago

(virt-covasim) C:\github\covasim\docs>make html Running Sphinx v7.1.2 Covasim 3.1.4 (2022-10-22) — © 2020-2022 by IDM

Configuration error: There is a programmable error in your configuration file:

Traceback (most recent call last): File "c:\virt-covasim\lib\site-packages\sphinx\config.py", line 356, in eval_config_file exec(code, namespace) # NoQA: S102 File "C:\github\covasim\docs\conf.py", line 19, in import covasim as cv File "c:\github\covasim\covasim__init.py", line 18, in from .defaults import * # Depends on settings File "c:\github\covasim\covasim\defaults.py", line 10, in import numba as nb File "c:\virt-covasim\lib\site-packages\numba__init__.py", line 42, in from numba.np.ufunc import (vectorize, guvectorize, threading_layer, File "c:\virt-covasim\lib\site-packages\numba\np\ufunc\init__.py", line 3, in from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize File "c:\virt-covasim\lib\site-packages\numba\np\ufunc\decorators.py", line 3, in from numba.np.ufunc import _internal SystemError: initialization of _internal failed without raising an exception

RCarter-IDM commented 1 year ago

steps to duplicate:

1) python -m venv virt-covasim (create virtual environment) 2) scripts\activate (activate virtual environment) 3) git clone https://github.com/RCarter-IDM/covasim.git (clone, after first creating fork) 4) pip install -e . (install from cloned repo, local) 5) pip install -r requirements.txt (from /docs dir) 6) make html (from /docs dir)

cliffckerr commented 1 year ago

@RCarter-IDM I wouldn't recommend using venv for this; numba doesn't seem to compile properly on it. I just tried these steps but using conda create -n virt-covasim python -y; conda activate virt-covasim instead of the first two steps, and the rest of the build worked fine. See also this PR that fixes some docs bugs: https://github.com/amath-idm/covasim/pull/1427

RCarter-IDM commented 1 year ago

@cliffckerr, I get '404' with provided link: https://github.com/amath-idm/covasim/pull/1427. What's the difference between these two repos: https://github.com/amath-idm/covasim and https://github.com/InstituteforDiseaseModeling/covasim ?

RCarter-IDM commented 1 year ago

(NOTE: attached file, makehtmloutput.txt, has full error/output after running make html) Results after using Anaconda for virtual environment:

Notebook error: CellExecutionError in tutorials\tut_advanced.ipynb:

BrokenProcessPool

makehtmloutput.txt

cliffckerr commented 1 year ago

Hm, that issue is probably related to multiprocessing on Windows (see e.g. here). But that problem should've been fixed by now.

Re: the two repos, amath-idm is our 'dev' repo and this is our 'public' repo (equivalent to DtkTrunk vs EMOD). Sorry for the delay, you should have access now. That PR is also included in this one, but that includes some style changes as well that I'm not sure we're ready to incorporate.

RCarter-IDM commented 11 months ago

Closing, as this works fine with our RTD build and with Windows multiprocessing issue fixed.