bebatut / enasearch

A Python library for interacting with ENA's API
http://bebatut.fr/enasearch
MIT License
22 stars 6 forks source link

ValueError: A boolean value must be only 'true' or 'false' #5

Closed tseemann closed 7 years ago

tseemann commented 7 years ago

I am not sure what is wrong here:

% enasearch retrieve_data --ids ERR924889  --display report

Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/bin/enasearch", line 11, in <module>
    load_entry_point('enasearch==0.0.5', 'console_scripts', 'enasearch')()
  File "/home/linuxbrew/.linuxbrew/opt/python3/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/linuxbrew/.linuxbrew/opt/python3/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/linuxbrew/.linuxbrew/opt/python3/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/linuxbrew/.linuxbrew/opt/python3/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/linuxbrew/.linuxbrew/opt/python3/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/linuxbrew/.linuxbrew/opt/python3/lib/python3.6/site-packages/enasearch/__main__.py", line 251, in retrieve_data
    header=header)
  File "/home/linuxbrew/.linuxbrew/opt/python3/lib/python3.6/site-packages/enasearch/__init__.py", line 407, in retrieve_data
    header=header)
  File "/home/linuxbrew/.linuxbrew/opt/python3/lib/python3.6/site-packages/enasearch/__init__.py", line 365, in build_retrieve_url
    check_boolean(expanded)
  File "/home/linuxbrew/.linuxbrew/opt/python3/lib/python3.6/site-packages/enasearch/__init__.py", line 281, in check_boolean
    raise ValueError(err_str)
ValueError: A boolean value must be only 'true' or 'false'
bebatut commented 7 years ago

Thanks @tseemann for spotting it (some remains of the first version...). Should be fixed with #9