question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Calling color definitions which are removed in latest openpyxl (3.0.4)

See original GitHub issue

Hi, I just encountered an issue with styleframe-3.0.4 when importing StyleFrame. I am running Python 3.6 in a docker with Pandas 0.25.3

From what I have figured out, my previous deplyment with openpyxl 3.0.3 worked fine. But during a new docker build openpyxl 3.0.4 was choosen as a dependency for styleframe and it cause the following error:

Traceback (most recent call last):
File "./main.py", line 13, in <module>
...
from styleframe import StyleFrame
File "/usr/local/lib/python3.6/site-packages/styleframe/__init__.py", line 3, in <module> 
 from .container import Container
File "/usr/local/lib/python3.6/site-packages/styleframe/container.py", line 4, in <module>
 from . import utils
File "/usr/local/lib/python3.6/site-packages/styleframe/utils.py", line 42, in <module> 
 class colors(BaseDefClass):
File "/usr/local/lib/python3.6/site-packages/styleframe/utils.py", line 45, in colors
 dark_blue = op_colors.DARKBLUE
AttributeError: module 'openpyxl.styles.colors' has no attribute 'DARKBLUE'
unable to load app 0 (mountpoint='') (callable not found or import error) 

Manually installing an earlier version of openpyxl (3.0.1) is my current workaround.

From my understanding, it happens due to this change https://bitbucket.org/openpyxl/openpyxl/commits/31cb130dd3b9a856b2fc3d8c1183d77e4cab51f1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DeepSpace2commented, Jun 26, 2020

styleframe 3.0.2 is released

1reaction
DeepSpace2commented, Jun 26, 2020

Thanks for the update.

As a quick fix, I will release soon a hotfix version of styleframe that pins openpyxl version to <= 3.0.3.

Later, I will change styleframe so it no longer depends on openpyxl’s colors defs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simple usage — openpyxl 3.0.10 documentation
When you merge cells all cells but the top-left one are removed from the worksheet. To carry the border-information of the merged cell,...
Read more >
Source code for openpyxl.styles.colors
Source code for openpyxl.styles.colors ... for the system foreground and background colours respectively # Will remove these definitions in a future release ...
Read more >
openpyxl.workbook.workbook module - Read the Docs
Copy an existing worksheet in the current workbook. Warning. This function cannot copy worksheets between workbooks. worksheets can only be copied within ...
Read more >
openpyxl.cell.cell module — openpyxl 3.0.10 documentation
Manage individual cells in a spreadsheet. The Cell class is required to know its value and type, display options, and any other features...
Read more >
Working with styles — openpyxl 3.0.10 documentation
font to set font size, color, underlining, etc. fill to set a pattern or color gradient; border to set borders on a cell;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found