Tâche #36039
Scénario #36093: Traitement express MEN fermés 31/08/2024
EOLE 2.10 : Traceback lors de l'import en mode texte (CSV)
Début:
26/06/2024
Echéance:
% réalisé:
100%
Restant à faire (heures):
0.0
Description
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/scribe/parsing/scribecsv2.py", line 37, in read_csv
reader = DictReader(io.open(csvfile, 'rU', encoding=encoding_found), delimiter=';')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU'
https://docs.python.org/3/whatsnew/3.11.html#porting-to-python-3-11
open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' (“universal newline”) in the file mode.
In Python 3, “universal newline” mode is used by default whenever a file is opened in text mode, and the 'U' flag has been deprecated since Python 3.3.
The newline parameter to these functions controls how universal newlines work. (Contributed by Victor Stinner in bpo-37330.)
Révisions associées
The 'U' flag is removed in Python 3.11
Ref: #36039
Historique
#1 Mis à jour par Joël Cuissinat il y a plus d'un an
- Statut changé de Nouveau à À valider
- Assigné à mis à Joël Cuissinat
#2 Mis à jour par Joël Cuissinat il y a plus d'un an
- Statut changé de À valider à Fermé
- % réalisé changé de 0 à 100
- Tâche parente changé de #34668 à #36093
- Restant à faire (heures) mis à 0.0