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

Cut a new release due to zenodo changes #573

Closed
IohannesArnold opened this issue Feb 21, 2024 · 4 comments
Closed

Cut a new release due to zenodo changes #573

IohannesArnold opened this issue Feb 21, 2024 · 4 comments

Comments

@IohannesArnold
Copy link

This is just to report that when I used the most recent published version of kraken, while I could run kraken list just fine, I would run into the error below with kraken get. I then saw issue #561 which made me try the master branch, and that worked fine. So you might want to cut a release soon; a point release at least even if bigger goals are not yet complete.

kraken get 10.5281/zenodo.2577813
Processing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% 0/0 bytes 0:00:00 0:00:00
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ RETACTED/.venv/bin/kraken:8 in <module>                       │
│                                                                                                  │
│   5 from kraken.kraken import cli                                                                │
│   6 if __name__ == '__main__':                                                                   │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])                         │
│ ❱ 8 │   sys.exit(cli())                                                                          │
│   9                                                                                              │
│                                                                                                  │
<CUT>
│                                                                                                  │
│ REDACTED/.venv/lib/python3.10/site-packages/kraken/kraken.py:                                    │
│ 704 in get                                                                                       │
│                                                                                                  │
│   701 │                                                                                          │
│   702 │   with KrakenDownloadProgressBar() as progress:                                          │
│   703 │   │   download_task = progress.add_task('Processing', total=0, visible=True if not ctx   │
│ ❱ 704 │   │   filename = repo.get_model(model_id, click.get_app_dir(APP_NAME),                   │
│   705 │   │   │   │   │   │   │   │     lambda total, advance: progress.update(download_task,    │
│   706 │   message(f'Model name: {filename}')                                                     │
│   707 │   ctx.exit(0)                                                                            │
│                                                                                                  │
│ REDACTED/.venv/lib/python3.10/site-packages/kraken/repo.py:135 in get_model                      |
│                                                                                                  │
│   132 │   │   raise KrakenRepoException(f'Found {resp["hits"]["total"]} models when querying f   │
│   133 │                                                                                          │
│   134 │   metadata = resp['hits']['hits'][0]                                                     │
│ ❱ 135 │   model_url = [x['links']['self'] for x in metadata['files'] if x['type'] == 'mlmodel'   │
│   136 │   # callable model identifier                                                            │
│   137 │   nat_id = os.path.basename(urllib.parse.urlparse(model_url).path)                       │
│   138 │   spath = os.path.join(path, nat_id)                                                     │
│                                                                                                  │
│ REDACTED/.venv/lib/python3.10/site-packages/kraken/repo.py:135 in <listcomp>                     |
│                                                                                                  │
│   132 │   │   raise KrakenRepoException(f'Found {resp["hits"]["total"]} models when querying f   │
│   133 │                                                                                          │
│   134 │   metadata = resp['hits']['hits'][0]                                                     │
│ ❱ 135 │   model_url = [x['links']['self'] for x in metadata['files'] if x['type'] == 'mlmodel'   │
│   136 │   # callable model identifier                                                            │
│   137 │   nat_id = os.path.basename(urllib.parse.urlparse(model_url).path)                       │
│   138 │   spath = os.path.join(path, nat_id)                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyError: 'type'
@johnlockejrr
Copy link

Same here, just wanted to open an issue

@johnlockejrr
Copy link

johnlockejrr commented Feb 27, 2024

Latest (main) version of kraken from github works:

(kraken_2) incognito@Nobody-Lap:~/kraken-dev$ kraken get 10.5281/zenodo.5468286
Processing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 16.1/16.1 MB 0:00:00 0:00:07
Model name: BiblIA_01.mlmodel

@mittagessen
Copy link
Owner

I'm waiting to merge #555 and then I'll tag a new release. Which shouldn't take longer than a week or two.

@mittagessen
Copy link
Owner

Kraken 5 has been released which makes the repository accessible from the CLI again.

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

No branches or pull requests

3 participants