Support for 3.6 and below: type object 'datetime.datetime' has no attribute 'fromisoformat'
hexbee opened this issue ยท 4 comments
Please check below errors, and it seems that fromisoformat
is not available in Python versions older than 3.7 -> ๐ https://stackoverflow.com/questions/60266554/type-object-datetime-datetime-has-no-attribute-fromisoformat
python3 --version
Python 3.6.8
python3 -m starcli -l python
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "~/repos/starcli/starcli/__main__.py", line 63, in <module>
search()
File "~/py3venv_20200617/lib64/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "~/py3venv_20200617/lib64/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "~/py3venv_20200617/lib64/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "~/py3venv_20200617/lib64/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "~/repos/starcli/starcli/__main__.py", line 38, in search
start_date = datetime.fromisoformat(
AttributeError: type object 'datetime.datetime' has no attribute 'fromisoformat'
Unfortunately yes. Currently, starcli does not support python versions below 3.7 because of fromisoformat
. Maybe we can use a python 3.6 and below compatible method to keep the date functionality, and I will look into this. Thank you for putting up the issue
Hello, @hexbee
I am happy to tell you that this issue has been fixed on release 2.2.0
You can upgrade starcli:
pip install -U starcli
Try your command again and it should work! ๐
Thanks again for reporting this issue and using starcli
@all-contributors please add @hexbee for bug
@hedythedev
I've put up a pull request to add @hexbee! ๐