Legilibre / Archeo-Lex

Pure Histoire de la Loi française – Git + Markdown
https://archeo-lex.fr
Do What The F*ck You Want To Public License
98 stars 17 forks source link

[nuitducodecitoyen2018] Plantage si données maquantes #53

Closed luffah closed 6 years ago

luffah commented 6 years ago

L'application semble planter lorsque les fichiers de données manquent.

! python2.7 archeo-lex 
Création de l’historique (legi.py)
> Texte LEGITEXT000006069414
Traceback (most recent call last):
  File "archeo-lex", line 169, in <module>
    principal(docopt(aide, help=False))
  File "archeo-lex", line 162, in principal
    textes = creer_historique_legi(data['textes'], data['format'], data['dossier'], data['cache'], data['bddlegi'])
  File "/work/nuitducode/Archeo-Lex/marcheolex/exporterlegi.py", line 90, in creer_historique_legi
    texte_traite = creer_historique_texte(texte, format, dossier, cache, bdd)
  File "/work/nuitducode/Archeo-Lex/marcheolex/exporterlegi.py", line 119, in creer_historique_texte
    last_update_jour = datetime.date(*(time.strptime(last_update, '%Y%m%d-%H%M%S')[0:3]))
  File "/usr/lib/python2.7/_strptime.py", line 478, in _strptime_time
    return _strptime(data_string, format)[0]
  File "/usr/lib/python2.7/_strptime.py", line 329, in _strptime
    found = format_regex.match(data_string)
TypeError: expected string or buffer