Closed Krazybug closed 5 years ago
By dichotomy, I got it and you should be able to reproduce it:
Run python myscript.py --help
with this code:
import fire
import requests
# from requests.adapters import HTTPAdapter
def my_subcommand(dir= '.', server=''):
pass
if __name__ == "__main__":
fire.Fire()
Uncomment the 3rd line and you should get the error !
Thanks for the report. Looks like a bug in our docstring parser. I'll take a closer look.
Congratulations it's already fixed! Awaiting the next release how can I modify my code to avoid this message ?
We'll do the release this week.
In the mean time, setting HTTPAdapter.__doc__ = ''
should unblock you.
Release is live. pip install -U fire
to upgrade. Thanks again for the bug report!
Thanks to you for the hard and efficient work !
Hello, After an upgrade to the current version of Fire, I got the following error on a script i ran without any change.
It Seems that a object is compared in docstring.py
FYI: I don't have any docstring (""") in my script and this other snippet diplays correct help message but the error is still displayed after the help message:
Note also that when I reinstall fire, this snippet works perfectly (doc is displayed without an error following) as the help of every subcommands of my script. It's only when i run python myscript.py --help that it's displayed the first time and after on each script i ran. It's sounds like something persistent changed in my env.
My version of python is 3.7.3. I'm using virtualenv and pip and here are my dependencies: