Projet

Général

Profil

Bug #74033

crash des tests sur openpyxl 3.1.0

Ajouté par Thomas Noël il y a environ un an. Mis à jour il y a environ un an.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
31 janvier 2023
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:
Non

Description

Exemple de crash :

[gw0] linux -- Python 3.9.2 /tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/bin/python

setup = <function setup.<locals>.maker at 0x7ff8e432dd30>
filetype = 'data.xlsx'

    def test_default_column_keynames(setup, filetype):
>       csvdata = CsvDataSource.objects.create(
            csv_file=File(get_file_content(filetype), filetype),
            sheet_name='Feuille2',
            slug='test2',
            title='a title',
            description='a description',
        )

tests/test_csv_datasource.py:140: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/models/manager.py:82: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
/tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/models/query.py:422: in create
    obj.save(force_insert=True, using=self.db)
passerelle/apps/csvdatasource/models.py:201: in save
    self.cache_data()
passerelle/apps/csvdatasource/models.py:206: in cache_data
    for block in batch(enumerate(self.get_rows()), 5000):
passerelle/apps/csvdatasource/models.py:271: in get_rows
    content = get_data_xls(fd.name)
/tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/pyexcel_xls/__init__.py:67: in get_data
    return read_data(afile, file_type=file_type, **keywords)
/tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/pyexcel_io/io.py:86: in get_data
    data, _ = _get_data(
/tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/pyexcel_io/io.py:105: in _get_data
    return load_data(**keywords)
/tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/pyexcel_io/io.py:205: in load_data
    result = reader.read_all()
/tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/pyexcel_io/reader.py:95: in read_all
    content_dict = self.read_sheet_by_index(sheet_index)
/tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/pyexcel_io/reader.py:84: in read_sheet_by_index
    sheet_reader = self.reader.read_sheet(sheet_index)
/tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/pyexcel_xlsx/xlsxr.py:148: in read_sheet
    sheet = SlowSheet(native_sheet, **self.keywords)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pyexcel_xlsx.xlsxr.SlowSheet object at 0x7ff8e43c9070>
sheet = <Worksheet "data">, keywords = {}

    def __init__(self, sheet, **keywords):
        self.xlsx_sheet = sheet
        self._keywords = keywords
        self.__merged_cells = {}
        self.max_row = 0
        self.max_column = 0
        self.__sheet_max_row = sheet.max_row
        self.__sheet_max_column = sheet.max_column
>       for ranges in sheet.merged_cells.ranges[:]:
E       TypeError: 'set' object is not subscriptable

/tmp/tox-jenkins/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/pyexcel_xlsx/xlsxr.py:72: TypeError

Serait-ce du à la toute récente version 3.1.0 d'openpyxl.

Si oui, dans un premier temps, rester en < 3.1 qui coïncide avec Debian.

Révisions associées

Révision 70e03e77 (diff)
Ajouté par Benjamin Dauvergne il y a environ un an

misc: fix incompatibility betwen pyexcel-xlsx and openpyxl 3.1.0 (#74033)

Historique

#1

Mis à jour par Benjamin Dauvergne il y a environ un an

  • Assigné à mis à Benjamin Dauvergne
#2

Mis à jour par Robot Gitea il y a environ un an

  • Statut changé de Nouveau à Solution proposée

Benjamin Dauvergne (bdauvergne) a ouvert une pull request sur Gitea concernant cette demande :

#3

Mis à jour par Thomas Noël il y a environ un an

  • Statut changé de Solution proposée à Solution validée
#4

Mis à jour par Robot Gitea il y a environ un an

  • Statut changé de Solution validée à Résolu (à déployer)

Benjamin Dauvergne (bdauvergne) a mergé une pull request sur Gitea concernant cette demande :

#5

Mis à jour par Transition automatique il y a environ un an

  • Statut changé de Résolu (à déployer) à Solution déployée
#6

Mis à jour par Transition automatique il y a environ un an

Automatic expiration

Formats disponibles : Atom PDF