lexicon
lexicon copied to clipboard
AuroraDNS AttributeError 'Nonetype' object has no attribute 'encode'
Running CentOS 7 with python3 installed. Upon running lexicon I get the following error. Cannot deduce what the problem could be. Any of you have a clue? Installed Lexicon by running pip3 install dns-leixcon[full], so all provider dependencies are available.
Traceback (most recent call last):
File "/usr/local/bin/lexicon", line 11, in <module>
load_entry_point('dns-lexicon==3.3.19', 'console_scripts', 'lexicon')()
File "/usr/local/lib/python3.6/site-packages/lexicon/cli.py", line 117, in main
results = client.execute()
File "/usr/local/lib/python3.6/site-packages/lexicon/client.py", line 77, in execute
self.provider.authenticate()
File "/usr/local/lib/python3.6/site-packages/lexicon/providers/base.py", line 69, in authenticate
return self._authenticate()
File "/usr/local/lib/python3.6/site-packages/lexicon/providers/aurora.py", line 36, in _authenticate
payload = self._get('/zones')
File "/usr/local/lib/python3.6/site-packages/lexicon/providers/base.py", line 142, in _get
return self._request('GET', url, query_params=query_params)
File "/usr/local/lib/python3.6/site-packages/lexicon/providers/aurora.py", line 146, in _request
action, url, timestamp)
File "/usr/local/lib/python3.6/site-packages/lexicon/providers/aurora.py", line 175, in _generate_auth_header
secret_key.encode('utf-8'), sig.encode('utf-8'),
AttributeError: 'NoneType' object has no attribute 'encode'
You installed Python packages on your Python system distribution using pip. This is strongly discouraged, since it is very likely to break one or more of the packages installed by your system package manager.
At this point you would better reinstall your Python system to avoid further inconsistent behaviors, and I strongly advice you to install Lexicon in a virtual environment (https://docs.python.org/3/tutorial/venv.html).