openpyxl can't open workbook that contains chart using non ascii in axis number format

Issue #876 resolved
Marcos Sánchez Provencio
created an issue

Bug created along with pull request #190

Comments (4)

  1. Marcos Sánchez Provencio reporter
        (openpyxl)marcos@marcos-pc2:~/src/openpyxl$ python2.7 -c "from openpyxl import load_workbook; load_workbook('xxx.xlsx')"
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "openpyxl/reader/excel.py", line 274, in load_workbook
            for c in find_charts(archive, rel.target):
          File "openpyxl/chart/reader.py", line 52, in find_charts
            cs = get_rel(archive, deps, rel.id, ChartSpace)
          File "openpyxl/packaging/relationship.py", line 158, in get_rel
            obj = cls.from_tree(tree)
          File "openpyxl/descriptors/serialisable.py", line 83, in from_tree
            obj = desc.expected_type.from_tree(el)
          File "openpyxl/descriptors/serialisable.py", line 83, in from_tree
            obj = desc.expected_type.from_tree(el)
          File "openpyxl/chart/plotarea.py", line 146, in from_tree
            self = super(PlotArea, cls).from_tree(node)
          File "openpyxl/descriptors/serialisable.py", line 83, in from_tree
            obj = desc.expected_type.from_tree(el)
          File "openpyxl/descriptors/serialisable.py", line 83, in from_tree
            obj = desc.expected_type.from_tree(el)
          File "openpyxl/descriptors/serialisable.py", line 83, in from_tree
            obj = desc.expected_type.from_tree(el)
          File "openpyxl/descriptors/serialisable.py", line 83, in from_tree
            obj = desc.expected_type.from_tree(el)
          File "openpyxl/descriptors/serialisable.py", line 83, in from_tree
            obj = desc.expected_type.from_tree(el)
          File "openpyxl/descriptors/serialisable.py", line 99, in from_tree
            return cls(**attrib)
          File "openpyxl/chart/data_source.py", line 80, in __init__
            self.formatCode = formatCode
          File "openpyxl/descriptors/nested.py", line 36, in __set__
            super(Nested, self).__set__(instance, value)
          File "openpyxl/descriptors/base.py", line 69, in __set__
            value = _convert(self.expected_type, value)
          File "openpyxl/descriptors/base.py", line 59, in _convert
            raise TypeError('expected ' + str(expected_type))
        TypeError: expected <type 'str'>
    
  2. Log in to comment