[scodoc-devel] Bug et plantage scodoc

Emmanuel Viennet emmanuel.viennet at univ-paris13.fr
Lun 15 Jan 11:18:40 CET 2018


Merci, c'est corrigé (et cette antédiluvienne fonction de conversion
des marques diacritiques serait à remplacer par une version moderne
plus robuste)





2018-01-14 17:47 GMT+01:00 Eric suet - Coordinateur Scodoc
<eric.suet at univ-nantes.fr>:
> Bonjour,
>
> Voici un nouveau bug qui a planté scodoc (pas le serveur debian ;)
> J'ai bien compris qu'il s'agissait un codage de caractère "spécial" u'\xab' donc "Left-pointing double angle quotation mark («)"
>
> J'ai contacté l'enseignant mais il serait préférable de gérer cela dans le code ;)
>
> Les extraits des 3 fichiers notes.log event.log Z2
>
> Au cas où ...
>
> Merci pour le boulot que vous/tu faites ;)
>
> notes.log
> ---------
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xab' in position 82: ordinal not in range(128)
>      return str(suppression_diacritics(unicode(s, SCO_ENCODING)))
>    File "/opt/scodoc/Products/ScoDoc/sco_utils.py", line 416, in suppress_accents
>      filename = unescape_html(suppress_accents(filename)).replace('&','').replace(' ','_')
>    File "/opt/scodoc/Products/ScoDoc/sco_utils.py", line 466, in sendPDFFile
>      return sendPDFFile(REQUEST, pdfdoc, filename)
>    File "/opt/scodoc/Products/ScoDoc/ZNotes.py", line 2186, in formsemestre_bulletins_pdf
>      return context.formsemestre_bulletins_pdf(formsemestre_id, REQUEST, version=version)
>    File "/opt/scodoc/Products/ScoDoc/sco_bulletins.py", line 891, in formsemestre_bulletins_pdf_choice
>      result=apply(object,args) # Type s<cr> to step into published object.
>    File "/opt/zope213/local/lib/python2.7/site-packages/Zope2-2.13.21-py2.7.egg/ZPublisher/Publish.py", line 48
> , in call_object
>      if debug is not None: return debug(object,args,context)
>    File "/opt/zope213/local/lib/python2.7/site-packages/Zope2-2.13.21-py2.7.egg/ZPublisher/mapply.py", line 77,
>   in mapply
>      request, bind=1)
>    File "/opt/zope213/local/lib/python2.7/site-packages/Zope2-2.13.21-py2.7.egg/ZPublisher/Publish.py", line 13
> 8, in publish
> [Sun Jan 14 14:20:40 2018] (GLT) Traceback (most recent call last):
> [Sun Jan 14 14:20:40 2018] (GLT) exception caught: UnicodeEncodeError
> [Sun Jan 14 14:20:40 2018] (GLT) get_bulletins_pdf(long): cache hit SEM12927 (id=139954933603648, thread=13995
> 5061376768)
>
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xab' in position 82: ordinal not in range(128)
>    Module Products.ScoDoc.sco_utils, line 416, in suppress_accents
>    Module Products.ScoDoc.sco_utils, line 466, in sendPDFFile
>    Module Products.ScoDoc.ZNotes, line 2186, in formsemestre_bulletins_pdf
>    Module Products.ScoDoc.sco_bulletins, line 891, in formsemestre_bulletins_pdf_choice
>    Module ZPublisher.Publish, line 48, in call_object
>    Module ZPublisher.mapply, line 77, in mapply
>    Module ZPublisher.Publish, line 138, in publish
> Traceback (innermost last):
> 2018-01-14T14:20:40 ERROR Zope.SiteErrorLog 1515936040.990.860650983211 https://scodoc7.sn.univ-nantes.prive/S
> coDoc/GLT/Scolarite/Notes/formsemestre_bulletins_pdf_choice
>
> event.log
> ------
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xab' in position 82: ordinal not in range(128)
>    Module Products.ScoDoc.sco_utils, line 416, in suppress_accents
>    Module Products.ScoDoc.sco_utils, line 466, in sendPDFFile
>    Module Products.ScoDoc.ZNotes, line 2186, in formsemestre_bulletins_pdf
>    Module Products.ScoDoc.sco_bulletins, line 891, in formsemestre_bulletins_pdf_choice
>    Module ZPublisher.Publish, line 48, in call_object
>    Module ZPublisher.mapply, line 77, in mapply
>    Module ZPublisher.Publish, line 138, in publish
> Traceback (innermost last):
> 2018-01-14T14:18:47 ERROR Zope.SiteErrorLog 1515935927.080.759414914384 https://scodoc7.sn.univ-nantes.prive/S
> coDoc/GLT/Scolarite/Notes/formsemestre_bulletins_pdf_choice
>
> Z2.log
> -------
> 127.0.0.1 - Anonymous [14/Jan/2018:14:20:26 +0200] "GET /VirtualHostBase/https/scodoc7.sn.univ-nantes.prive:44
> 3/ScoDoc/GLT/Scolarite/Notes/formsemestre_bulletins_pdf_choice?formsemestre_id=SEM12927 HTTP/1.1" 200 14056 "h
> ttps://scodoc7.sn.univ-nantes.prive/ScoDoc/GLT/Scolarite/Notes/formsemestre_status?formsemestre_id=SEM12927" "
> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Saf
> ari/537.36"
>
> --
> _______________________________________
>    Eric SUET
>     *Coordinateur Scodoc*
>      http://notes.iutsn.fr
>
>    IUT de Saint-Nazaire
>    Université de Nantes
> _______________________________________
> _______________________________________________
> scodoc-devel mailing list
> scodoc-devel at listes.univ-paris13.fr
> https://listes.univ-paris13.fr/mailman/listinfo/scodoc-devel


Plus d'informations sur la liste de diffusion scodoc-devel