-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: [('PEM routines', 'PEM_read_bio', 'no start line')] #25
Comments
@kyale-mwendwa @tomdyson am also getting this error please view it here at stackoverflow https://stackoverflow.com/questions/49898939/error-at-admin-analytics-token-exception-valuepem-routines-pem-read-bi?noredirect=1#comment86815089_49898939 |
OpenSSL.crypto.load_privatekey can't detect start line due to a str.replace for '\n' and '\r'. json.loads() can't handle '\n' and '\r' cause it thinks they are control character. Therefore '\n' and '\r' has to be double escape rather than deleted. OpenSSL.crypto.load_privatekey can't handle '\r' either, so a private_key with '\r' wouldn't work anyway. ¯\_(ツ)_/¯ Error: OpenSSL.crypto.Error: [('PEM routines', 'get_name', 'no start line')] Ref: tomdyson#25 https://stackoverflow.com/a/45571017
OpenSSL.crypto.load_privatekey can't detect start line due to a str.replace() for '\n' and '\r'. json.loads() can't handle '\n' and '\r' cause it thinks they are control character. Therefore '\n' and '\r' has to be double escape rather than deleted. OpenSSL.crypto.load_privatekey() can't handle '\r' either, so a private_key with '\r' wouldn't work anyway. ¯\_(ツ)_/¯ Error: OpenSSL.crypto.Error: [('PEM routines', 'get_name', 'no start line')] Ref: tomdyson#25 https://stackoverflow.com/a/45571017
OpenSSL.crypto.load_privatekey can't detect start line due to a str.replace() for '\n' and '\r'. json.loads() can't handle '\n' and '\r' cause it thinks they are control character. Therefore '\n' and '\r' have to be double escape rather than deleted. OpenSSL.crypto.load_privatekey() can't handle '\r' either, so a private_key with '\r' wouldn't work anyway. ¯\_(ツ)_/¯ Error: OpenSSL.crypto.Error: [('PEM routines', 'get_name', 'no start line')] Ref: tomdyson#25 https://stackoverflow.com/a/45571017
Until a fix is merged, editing the private key solves this issue. I've replaced \n
These |
Hi I have run into a brick wall trying to get the wagtail anayltics to work. Followed the instructions on the page and I keep getting the following error while running it.
`[10/Apr/2018 15:53:41] "GET /admin/analytics/dashboard/ HTTP/1.1" 200 10119
Internal Server Error: /admin/analytics/token/
Traceback (most recent call last):
File "E:\Python27\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
response = get_response(request)
File "E:\Python27\lib\site-packages\django\core\handlers\base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "E:\Python27\lib\site-packages\django\core\handlers\base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "E:\Python27\lib\site-packages\django\core\handlers\base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "E:\Python27\lib\site-packages\django\views\decorators\cache.py", line 43, in _cache_controlled
response = viewfunc(request, *args, **kw)
File "E:\Python27\lib\site-packages\wagtail\wagtailadmin\decorators.py", line 24, in decorated_view
return view_func(request, *args, **kwargs)
File "E:\Python27\lib\site-packages\django\utils\decorators.py", line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "E:\Python27\lib\site-packages\wagalytics\views.py", line 41, in token
access_token = get_access_token_from_str(settings.GA_KEY_CONTENT)
File "E:\Python27\lib\site-packages\wagalytics\views.py", line 33, in get_access_token_from_str
keyDict, SCOPE)
File "E:\Python27\lib\site-packages\oauth2client\service_account.py", line 264, in from_json_keyfile_dict
revoke_uri=revoke_uri)
File "E:\Python27\lib\site-packages\oauth2client\service_account.py", line 196, in _from_parsed_json_keyfile
signer = crypt.Signer.from_string(private_key_pkcs8_pem)
File "E:\Python27\lib\site-packages\oauth2client_openssl_crypt.py", line 119, in from_string
pkey = crypto.load_privatekey(crypto.FILETYPE_PEM, parsed_pem_key)
File "E:\Python27\lib\site-packages\OpenSSL\crypto.py", line 2795, in load_privatekey
_raise_current_error()
File "E:\Python27\lib\site-packages\OpenSSL_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
Error: [('PEM routines', 'PEM_read_bio', 'no start line')]
[10/Apr/2018 15:53:45] "GET /admin/analytics/token/ HTTP/1.1" 500 18756`
The text was updated successfully, but these errors were encountered: