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

Examples fail to run #2

Open
jimrybarski opened this issue Nov 16, 2021 · 2 comments · May be fixed by #13
Open

Examples fail to run #2

jimrybarski opened this issue Nov 16, 2021 · 2 comments · May be fixed by #13
Labels
bug Something isn't working

Comments

@jimrybarski
Copy link

Description

Running the example code from the documentation fails with this exception:
TypeError: batches_support_wrapper() missing 1 required positional argument: 'collection'

Reproduce

Run this code with easy_entrez 0.3.0:

from easy_entrez import EntrezAPI

entrez_api = EntrezAPI(
    'test',
    '[email protected]'
)

print(entrez_api.link(database=None, ids=[15718680, 157427902], database_from='protein', command='acheck'))

Expected behavior

It should return results instead of throwing this exception.

Context

OS: Ubuntu 18.04.6 LTS
Python: 3.6.9
easy_entrez 0.3.0 was installed in a virtualenv.

@jimrybarski jimrybarski added the bug Something isn't working label Nov 16, 2021
@krassowski
Copy link
Owner

krassowski commented Nov 16, 2021

Thank you for reporting the issue. The ids should be the first positional argument.

print(entrez_api.link([15718680, 157427902], database=None, database_from='protein', command='acheck'))

or keyed as a collection=:

print(entrez_api.link(database=None, collection=[15718680, 157427902], database_from='protein', command='acheck'))

The documentation needs updating.

@dodoflyy
Copy link

Hey, this bug still exist in v0.3.6? still can't use ids=.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants