readthedocs / sphinx-notfound-page

Create a custom 404 page with absolute URLs hardcoded
https://sphinx-notfound-page.readthedocs.io/
MIT License
48 stars 32 forks source link

Could not import extension notfound.extension (exception: No module named 'notfound') #196

Closed angelinekwan closed 2 years ago

angelinekwan commented 2 years ago

It works locally following by 1) Installation pip3 install sphinx-notfound-page 2) Add this extension in the conf.py file as:

extensions = [
 'notfound.extension',
]

3) Add configuration notfound_urls_prefix = None

But when build in Netlify - Sphinx / prose it returns error as following:

Could not import extension notfound.extension (exception: No module named 'notfound')
make: *** [Makefile:22: linkcheck] Error 2

Environment info Python VENV Python 3.9.12 Sphinx build version sphinx-build 4.3.2

Any advice? Thanks in advance.

humitos commented 2 years ago

Hi! It seems you need to install the Sphinx extensions on the environment running on Netlify as well. I do not have experience with it. So, I'm not sure I'll be able to provide too much help there.

If you figure it out, please share the answer here.

angelinekwan commented 2 years ago

Like you mentioned, the extensions need to be added to the environment. In this case, add the extension to requirements.txt sphinx-notfound-page==0.8

Thanks for checking!