Bonjour,
Je suis entrain de travailler sur le fichier ci-dessous. (il s'agit de quelque fonction pour manipuler une fichie xml)
http://nlp.lsi.upc.edu/awn/AWNDatabaseManagement.py.gz
et il prend comme entré ce fichier
http://nlp.lsi.upc.edu/awn/awn.xml.gz
Il est écris en 2008 avec python2 et je veux le transformer en pyhton3 sachant que J'ai utiliser le 2to3 et j'ai eu un résultat parfait. Mais, quand j'ai exécuté l'erreur ci-dessous a apparu sachant que le fichier s’exécute parfaitement avec python2.
Quelqu'un me dit s'il vous plais de quoi il s'agit?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 ('processing file ', 'awn.xml') <_io.TextIOWrapper name='awn.xml' mode='r' encoding='cp1252'> Traceback (most recent call last): File "D:\Projets\Python\awnman.py", line 402, in <module> loadAWNfile(opts['i']) File "D:\Projets\Python\awnman.py", line 372, in loadAWNfile p.ParseFile(ent) File "D:\Logiciel\WinPython-64bit-3.4.4.5Qt5\python-3.4.4.amd64\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 100: character maps to <undefined>
Partager