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

KeyError when using --filter all #3

Open
LennertVerboven opened this issue Jul 16, 2021 · 1 comment
Open

KeyError when using --filter all #3

LennertVerboven opened this issue Jul 16, 2021 · 1 comment

Comments

@LennertVerboven
Copy link

When using the 'all' filter option I get the following error:

PS C:\Users\Lennert\workspaces\who2tbp> who2tbp --filter all WHO-UCN-GTB-PCI-2021.7-eng.xlsx > tbdb_who.py
[who2tbp.exe – 2021-07-16 09:27:48,582]: Welcome to who2tbp.exe
[who2tbp.exe – 2021-07-16 09:27:48,582]: Processing Excel file...
Traceback (most recent call last):
File "c:\users\lennert\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\lennert\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Lennert\Anaconda3\Scripts\who2tbp.exe_main
.py", line 9, in
File "c:\users\lennert\anaconda3\lib\site-packages\who2tbp\bin\main.py", line 39, in main
data = parse_file(args.INFILE, this_filter=args.filter)
File "c:\users\lennert\anaconda3\lib\site-packages\who2tbp\lib\parse_excel_data.py", line 37, in parse_file
conf_class = [CONF_CLASSES[this_filter]]
KeyError: 'all'

This seems to be cause by the test on the following line which test 'filter' instead of 'this_filter'

if filter == 'all':

andersgs added a commit that referenced this issue Jul 20, 2021
@andersgs
Copy link
Contributor

Thank you @LennertVerboven.

I would not encourage the use of all just yet. There are a number of edge cases that I don't think will be translated correctly yet.

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

2 participants