-
Notifications
You must be signed in to change notification settings - Fork 208
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
Issues with RSAAlgorithm when trying to use private or partner apps #90
Comments
Simply did not have cryptography installed. |
This is still an issue. Please update the requirements to include the cryptography package! |
What do you mean @martinwinter ? |
@romgar Thanks for your quick response. Hm, I just installed pyxero via pip and had to manually install cryptography to make it work, hence my comment. Perhaps the configuration on pip is old? (Sorry, I am an experienced programmer but am just starting to use Python.) |
Here is my terminal output for installing pyxero (I ended up using Python 3 but it happened there as well):
And here is the error when trying to access an API endpoint:
|
Just FYI, I installed both Python versions with Homebrew. |
I also now run into "AttributeError: module 'jwt.algorithms' has no attribute 'RSAAlgorithm'" |
Can you try to install |
Will do, but the error went away after I installed jwt manually. I now have an invalid key error, which may be correct, I will look into that now. |
I installed from github but the invalid key error is actually an import error somewhere else
|
I changed the dependencies to: Luckily, it works now. |
With Mac it still has the same issue, I am able to resolve it by using docker. Below is the command to install the required libraries via docker And here are the components added in requirements.txt file I am adding the installed libraries to the current directory. Reference link: |
Hey guys, I'm testing using pyxero with different application types and for both private and partner I'm seeing the following error and am wondering if you have seen it before or know why?
Traceback (most recent call last):
File "", line 1, in
File "xero\auth.py", line 350, in init
self.init_credentials(oauth_token, oauth_token_secret)
File "xero\auth.py", line 146, in init_credentials
response = requests.post(url=url, auth=oauth, cert=self.client_cert)
File "c:\Python27\lib\site-packages\requests-2.7.0-py2.7.egg\requests\api.py", line 109, in post
return request('post', url, data=data, json=json, *kwargs)
File "c:\Python27\lib\site-packages\requests-2.7.0-py2.7.egg\requests\api.py", line 50, in request
response = session.request(method=method, url=url, *kwargs)
File "c:\Python27\lib\site-packages\requests-2.7.0-py2.7.egg\requests\sessions.py", line 451, in request
prep = self.prepare_request(req)
File "c:\Python27\lib\site-packages\requests-2.7.0-py2.7.egg\requests\sessions.py", line 382, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "c:\Python27\lib\site-packages\requests-2.7.0-py2.7.egg\requests\models.py", line 308, in prepare
self.prepare_auth(auth, url)
File "c:\Python27\lib\site-packages\requests-2.7.0-py2.7.egg\requests\models.py", line 496, in prepare_auth
r = auth(self)
File "c:\Python27\lib\site-packages\requests_oauthlib-0.5.0-py2.7.egg\requests_oauthlib\oauth1_auth.py", line 87, in call
unicode(r.url), unicode(r.method), None, r.headers)
File "c:\Python27\lib\site-packages\oauthlib\oauth1\rfc5849__init.py", line 313, in sign
('oauth_signature', self.get_oauth_signature(request)))
File "c:\Python27\lib\site-packages\oauthlib\oauth1\rfc5849__init.py", line 150, in get_oauth_signature
sig = self.SIGNATURE_METHODS[self.signature_method](base_string, self)
File "c:\Python27\lib\site-packages\oauthlib\oauth1\rfc5849\signature.py", line 505, in sign_rsa_sha1_with_client
return sign_rsa_sha1(base_string, client.rsa_key)
File "c:\Python27\lib\site-packages\oauthlib\oauth1\rfc5849\signature.py", line 496, in sign_rsa_sha1
alg = _jwt_rs1_signing_algorithm()
File "c:\Python27\lib\site-packages\oauthlib\oauth1\rfc5849\signature.py", line 474, in _jwt_rs1_signing_algorithm
_jwtrs1 = jwtalgo.RSAAlgorithm(jwtalgo.hashes.SHA1)
AttributeError: 'module' object has no attribute 'RSAAlgorithm'
The text was updated successfully, but these errors were encountered: