Open javivu opened 1 month ago
I have the same issue. it's like it is ignoroing the NETBOX_TOKEN var in the env file.
@julianfirminger-united , you have me an idea, we check the code.
The problem is in:
File "/Device-Type-Library-Import/netbox_api.py", line 50, in verify_compatibility version_split = [int(x) for x in self.netbox.version.split('.')]
and
File "/Device-Type-Library-Import/venv/lib/python3.10/site-packages/pynetbox/core/api.py", line 111, in version ).get_version()
The function get_version() from Pynetbox, don't use token?
@julianfirminger-united I do a "dirty" workaround for the momment, In the file netbox_api.py I modify the function verify_compatibility() because my version of netbox is NetBox 4.0.5
def verify_compatibility(self):
# nb.version should be the version in the form '3.2'
#version_split = [int(x) for x in self.netbox.version.split('.')]
# Later than 3.2
# Might want to check for the module-types entry as well?
#if version_split[0] > 3 or (version_split[0] == 3 and version_split[1] >= 2):
self.modules = True
@javivu can confirm this works. Thanks for the work!
Hi to all!
Trying to execute "./nb-dt-import.py" i got the error:
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)
My deploy:
My .env:
NETBOX_URL=https://netbox.mydomain.com/ NETBOX_TOKEN=******* REPO_URL=https://github.com/netbox-community/devicetype-library.git REPO_BRANCH=master IGNORE_SSL_ERRORS=False
If I try to use IGNORE_SSL_ERRORS=True another error:
pynetbox.core.query.RequestError: The request failed with code 403 Forbidden: {'detail': 'Authentication credentials were not provided.'}
The script and netbox are installed in the same server.