Netbox Update issue in the "Building documentation (mkdocs build)..." part #12101
Unanswered
gfhoffmann
asked this question in
Help Wanted!
Replies: 1 comment 3 replies
-
Why can you not just put the secret key inline in the config file? If you want to drive configuration.py from environment variables, then I suggest you copy how netbox-docker does it. In particular, for mkdocs and collectstatic you can see in the Dockerfile that they pass a dummy value for SECRET_KEY explicitly, probably to work around the exact problem you're seeing. Therefore, I suspect you may have to do something similar for your GROUP_MAPPINGS. Even if mkdocs doesn't use the value, there's still a bunch of python library setup which will be done. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there!
I'm updating Netbox from 3.1.11 to 3.3.10 and I'm having some issues with the mkdocs build part. It seems that it can't get some of my env vars (but when I print them, they are there). And this problem happens in two points:
In my configuration.py file I have:
SECRET_KEY = os.environ.get('SECRET_KEY')
But when I run the upgrade, I have this error:
This GROUP_MAPPINGS needs a dict, but I get this value from a env var, which should be a string. So I have to map this value (I was using a method to do this, but was having errors, so I changed to use a json.loads() so I saved my dict inside a string to them parse it, but I had the same errors as well. The error is as below:
We can see a pettern here, it seems that its not being able to get the env var (but when I print the vars in my configuration.py and in my settings.py files, the values are there).
I tried to put mkdocstrings[python]>=0.20.0 into my local_requirements.txt file, but I had the exactly same issue from this person: https://stackoverflow.com/questions/75803054/documentation-build-issues-during-upgrade-netbox
I have found this that maybe can lead to something: https://stackoverflow.com/questions/68516144/mkdocs-with-mkdocstrings-fails-to-serve-with-could-not-collect-error
What can I do to solve this? Thanks!
My local_requirements.txt is like this:
Beta Was this translation helpful? Give feedback.
All reactions