Skip to content
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

'GalaxyInstance' raises AttributeError when instantiated with email & password combination #398

Closed
pjbriggs opened this issue Aug 3, 2021 · 2 comments · Fixed by #399
Closed

Comments

@pjbriggs
Copy link

pjbriggs commented Aug 3, 2021

I've encountered an issue with creating a new instance of the GalaxyInstance class (in the galaxy module) with a user email and password combination. For example something like:

from bioblend import galaxy
gi = galaxy.GalaxyInstance(url="https://usegalaxy.org",key="foo")

works, but

from bioblend import galaxy
gi = galaxy.GalaxyInstance(url="https://usegalaxy.org",email="peter.briggs@manchester.ac.uk",password="bar")

raises an AttributeError:

Traceback (most recent call last):
  File "bioblend_error.py", line 31, in <module>
    password="bar")
  File "XXXX/lib/python3.6/site-packages/bioblend/galaxy/__init__.py", line 75, in __init__
    super().__init__(url, key, email, password, verify=verify)
  File "XXXX/lib/python3.6/site-packages/bioblend/galaxyclient.py", line 68, in __init__
    'x-api-key': self.key,
  File "XXXX/lib/python3.6/site-packages/bioblend/galaxyclient.py", line 266, in key
    headers = self.json_headers.copy()
AttributeError: 'GalaxyInstance' object has no attribute 'json_headers'

The issue is observed with Python 3.6.9 using bioblend 0.16.0 but is absent from version 0.15.0.

Any insight into addressing this issue would be welcome! Thanks
Peter

@simonbray
Copy link
Member

Hi @pjbriggs, I pushed a fix here, can you test if it works for you? #399

@simonbray simonbray linked a pull request Aug 3, 2021 that will close this issue
@pjbriggs
Copy link
Author

pjbriggs commented Aug 3, 2021

Hello @simonbray

The fix works for me (for both a simple example and within another application) so it looks good to me! 👍

Thanks for looking at this so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants