from openpyxl.styles import Style, Font ImportError: cannot import name Style

佐手、 提交于 2019-12-11 05:42:23

问题


While running a python code, I am facing the following error :

sbassi-mbpro:FacebookEventScraper-master sbassi$ python facebook_event_scraper.py 
Traceback (most recent call last):
  File "facebook_event_scraper.py", line 13, in <module>
    from openpyxl.styles import Style, Font
ImportError: cannot import name Style

python -V
Python 2.7.10

回答1:


Looking at the source code for openpyxl.styles, the __init__.py file doesn't define any name: Style.

Perhaps you were looking for NamedStyle instead?



来源:https://stackoverflow.com/questions/39628005/from-openpyxl-styles-import-style-font-importerror-cannot-import-name-style

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!