Comments (13)
I'm using the most recent release v21.09
from bioblend.
I quickly checked and /api/datasets/{dataset_id}
should return a dictionary not a list. Otherwise, https://github.com/galaxyproject/bioblend/blob/v0.16.0/bioblend/_tests/TestGalaxyDatasets.py#L84 should be failing too right? I'm confused too...
from bioblend.
Hi @stvlar,
It seems the result returned by the Galaxy API has changed, I wasn't aware of that.
Probably the best solution is to change the line after the invocation to something like the following:
results_id = gi.invocations.show_invocation(results_run['id'])['outputs']
from bioblend.
Thank you for your response that worked!
Also I'm getting an error releated to
gi.datasets.download_dataset(id_str, file_path=result_path, maxwait=max_timeout)
This is the error message
TypeError at /tool/
list indices must be integers or slices, not str
This is the traceback
Traceback (most recent call last):
File "/home/stella/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/stella/.local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/stella/pasteur/app/views.py", line 198, in tool
gi.datasets.download_dataset(id_str, file_path=result_path, maxwait=max_timeout)
File "/home/stella/.local/lib/python3.8/site-packages/bioblend/galaxy/datasets/__init__.py", line 92, in download_dataset
dataset = self.wait_for_dataset(dataset_id, maxwait=maxwait, check=False)
File "/home/stella/.local/lib/python3.8/site-packages/bioblend/galaxy/datasets/__init__.py", line 385, in wait_for_dataset
state = dataset['state']
Exception Type: TypeError at /tool/
Exception Value: list indices must be integers or slices, not str
```
`
Again this is the first time this has been an issue for me so I'm a bit lost
from bioblend.
That is quite strange. The error is on this line: https://github.com/galaxyproject/bioblend/blob/v0.16.0/bioblend/galaxy/datasets/__init__.py#L385
So it would suggest that the show_dataset()
method (used on line 384 above) is returning a list, rather than a dict as expected.
Can you check if that is really the case?
from bioblend.
As far as I can see it is returning a dictionary
`
dataset | [{'create_time': ...',
'dataset_id': '...',
'deleted': False,
'extension': 'auto',
'hid': 187,
'history_content_type': 'dataset',
'history_id': '..',
'id': '...',
'name': '...',
'purged': False,
'state': 'queued',
'tags': [],
'type': 'file',
'type_id': 'dataset',
'update_time': '....',
'url': '....',
'visible': True},
-- | --
`
from bioblend.
[{
Looks like a list of dicts to me?
@davelopez maybe you have some idea here? 😕
from bioblend.
@stvlar are you using a particular Galaxy version?
from bioblend.
[{
Looks like a list of dicts to me?
@davelopez maybe you have some idea here? confused
yes there were more dicts there I just left them out since the only difference between them was the input file and the time
from bioblend.
It seems the result returned by the Galaxy API has changed, I wasn't aware of that.
We should not be changing the API, which endpoint do you think has changed the response ? I'd also assume both the bioblend tests and Galaxy tests would be failing if that was the case. Does the invocation in question maybe not have any outputs ? What was the original exception ?
from bioblend.
What was the original exception ?
The original exception was a KeyError with 'outputs' being the exception value
the original problem was this line
results_id = results_run['outputs']
from bioblend.
Can you paste it please together with the response ? And ideally a reproducible example
from bioblend.
@mvdbeek
this is the original traceback
Traceback (most recent call last):
File "/home/stella/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/stella/.local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/stella/project/app/views.py", line 195, in tool
results_id = results_run['outputs']
Exception Type: KeyError at /tool/
Exception Value: 'outputs'
Request Method: | POST
Request URL : http://127.0.0.1:8000/tool/
Django Version : 3.2.11
Exception Type : KeyError
Exception Value : 'outputs'
Exception Location : /home/stella/project/app/views.py, line 195, in tool
Python Executable : /usr/bin/python3
Python Version : 3.8.10
Python Path : ['/home/stella/project', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/stella/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.8/dist-packages', '/home/stella/project']
Server time : Fri, 21 Jan 2022 12:40:56 +0000
the code is in my original question
Unfortunately I can't send a reproducible example for confidentiality reasons
from bioblend.
Related Issues (20)
- Method to cancel a job
- Add type annotations to BioBlend API HOT 2
- Rebuild docs with sphinx-apidoc
- Add an `invoke()` method to the BioBlend.objects `Workflow` class
- Fix unreliable tests
- Add tests for bioblend.toolshed
- 'GalaxyInstance' raises AttributeError when instantiated with email & password combination HOT 2
- Incorrect PyYAML version for bioblend 0.9.0 - 0.16.0 HOT 1
- Getting abosl HOT 1
- partial workflow invocation HOT 9
- Drop cloudlaunch support ? HOT 4
- Add support for parameter "all" in get_histories HOT 2
- Tool search in Toolshed: number total results HOT 6
- File name displayed as Pasted Entry for file uploaded using upload_file_contents HOT 2
- Downloading a file from a shared data library HOT 3
- Extend bioblend to support the new notification API HOT 3
- Bioblend reporting workflow as failed while workflow is running or completed successfully. HOT 6
- workflows.refactor_workflows fails on subworkflows HOT 14
- Allow Session Cookies in Requests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bioblend.