ImportError: cannot import name 'coordinate_from_string' from 'openpyxl.utils'
Closed this issue · 2 comments
kedf commented
Hi ,
I'm using :
Python : 3.7
openpyxl : 2.6.2 (Last Stable)
d6tstack : 0.1.8
Traceback (most recent call last):
File "/home/kedf/PycharmProjects/XLStoSQL/xlsxtosql.py", line 1, in <module>
import d6tstack.convert_xls
File "/usr/local/lib/python3.7/site-packages/d6tstack/convert_xls.py", line 12, in <module>
from openpyxl.utils import coordinate_from_string
ImportError: cannot import name 'coordinate_from_string' from 'openpyxl.utils' (/usr/local/lib/python3.7/site-packages/openpyxl/utils/__init__.py)
In the docs of openpyxl 2.6.2 , function seems to be named -> openpyxl.utils.cell.coordinate_from_string
https://openpyxl.readthedocs.io/en/stable/api/openpyxl.utils.cell.html#openpyxl.utils.cell.coordinate_from_string
So maybe changing line 12 of d6tstack/convert_xls.py"
from openpyxl.utils import coordinate_from_string
to
from openpyxl.utils.cell import coordinate_from_string
will fix it ?
Thanks
d6tdev commented
Thanks for reporting. Can you test the latest dev version 0.1.9 see if it works?
pip install git+https://github.com/d6t/d6tstack.git -U --no-deps
kedf commented
It's working fine now, thanks.