Projet

Général

Profil

Bug #51005

Trace sur anchor date

Ajouté par Emmanuel Cazenave il y a environ 3 ans. Mis à jour il y a environ 3 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
10 février 2021
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:
Non

Description

Une variable anchor_date qui se retrouve avec la chaîne de caractères 'None' :


Exception:
  type = '<class 'ValueError'>', value = 'time data 'None' does not match format '%d/%m/%y''

Stack trace (most recent call first):
  File "/usr/lib/python3.7/_strptime.py", line 359, in _strptime
   357     if not found:
   358         raise ValueError("time data %r does not match format %r" %
>  359                          (data_string, format))
   360     if len(data_string) != found.end():
   361         raise ValueError("unconverted data remains: %s" %

  locals: 
     arg = '%d/%m/%y'
     data_string = 'None'
     format = '%d/%m/%y'
     format_regex = re.compile('(?P<d>3[0-1]|[1-2]\\d|0[1-9]|[1-9]| [1-9])/(?P<m>1[0-2]|0[1-9]|[1-9])/(?P<y>\\d\\d)', re.IGNORECASE)
     found = None
     index = 1
     locale_time = <_strptime.LocaleTime object at 0x7f052629fcc0>

  File "/usr/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
   575     """Return a class cls instance based on the input string and the
   576     format string.""" 
>  577     tt, fraction, gmtoff_fraction = _strptime(data_string, format)
   578     tzname, gmtoff = tt[-2:]
   579     args = tt[:6] + (fraction,)

  locals: 
     cls = <class 'datetime.datetime'>
     data_string = 'None'
     format = '%d/%m/%y'

  File "/usr/lib/python3/dist-packages/wcs/qommon/misc.py", line 251, in get_as_datetime
   249         except ValueError as e:
   250             exception = e
>  251     raise exception
   252 
   253 

  locals: 
     exception = ValueError("time data 'None' does not match format '%d/%m/%y'")
     format_string = '%d/%m/%y'
     formats = ['%d/%m/%Y %H:%M', '%d/%m/%Y', '%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M:%S', '%Y-%m-%dT%H:%M:%S', '%Y-%m-%dT%H:%M:%SZ', '%y-%m-%d %H:%M', '%y-%m-%d %H:%M:%S', '%d/%m/%Y %H:%M', '%d/%m/%Y %H:%M:%S', '%d/%m/%Y %Hh%M', '%d/%m/%y %H:%M', '%d/%m/%y %H:%M:%S', '%d/%m/%y %Hh%M', '%Y-%m-%d', '%y-%m-%d', '%d/%m/%Y', '%d/%m/%y']
     s = 'None'
     value = ['%d/%m/%Y', '%d/%m/%y']

  File "/usr/lib/python3/dist-packages/wcs/workflows.py", line 1245, in must_trigger
  1243                 anchor_date = get_as_datetime(anchor_date)
  1244             except ValueError:
> 1245                 get_publisher().notify_of_exception(sys.exc_info(), context='[TIMEOUTS]')
  1246                 anchor_date = None
  1247         elif anchor_date:

Historique

#2

Mis à jour par Frédéric Péters il y a environ 3 ans

  • Statut changé de Nouveau à Fermé

{{form_var_date_rdv}}

qui donne None quand il n'y a pas cette variable.

Qui donne la trace du cron, dont la taille est multipliée par le nombre de demandes.

Je viens de corriger ça en {{form_var_date_rdv|default:""}}.

Formats disponibles : Atom PDF