Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openpyxl
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 265
    • Issues 265
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • openpyxl
  • openpyxl
  • Issues
  • #1842
Closed
Open
Issue created Jun 22, 2022 by Leon Loopik@Lewn

Saving a workbook with richtext enabled gives an error on python > 3.9

When loading, and later saving again a richtext enabled workbook, I get a combination of the following errors (on python 3.10)

  File "C:\...\lib\site-packages\openpyxl\cell\_writer.py", line 82, in etree_write_cell
    text = r.name
AttributeError: 'TextBlock' object has no attribute 'name' 

  File "C:\...\lib\site-packages\openpyxl\xml\functions.py", line 86, in whitespace
    if node.text != node.text.strip():
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'strip'

While searching for the issue, I found that others ran into it as well: issue on google groups

I fixed the bug locally, and attached the diff below (I don't know if this is the correct workflow, but I could not find how else to do this, not used to mercurial).

patch.diff

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking