Crème CRM
importation en masse problème de date - Version imprimable

+- Crème CRM (https://www.cremecrm.com/forum)
+-- Forum : Utilisateurs (https://www.cremecrm.com/forum/forumdisplay.php?fid=5)
+--- Forum : Questions (https://www.cremecrm.com/forum/forumdisplay.php?fid=8)
+--- Sujet : importation en masse problème de date (/showthread.php?tid=159)



importation en masse problème de date - christophe - 30-09-2020

Bonjour,

Je tenté d'importer nos fichiers Excel de "CRM". j'ai réussit à en importer deux, mais pour les autres, j'ai un problème sur une date, il me semble. L hic, c'est qu'il n'y a pas de dates dans les fichiers (j'ai supprimer les colonnes)


Code :
....  
[2020-09-30 09:57:25] WARNING - creme.creme_core.core.job : JobManager.handle_co                                                                                                                                                             mmand_start() -> not yet existing jod ID: 30
[2020-09-30 09:57:25] WARNING - creme.creme_core.core.job : JobManager: deferred                                                                                                                                                              job exists now: 30
[2020-09-30 09:57:31] ERROR - creme.creme_core.creme_jobs.base : 40.0
Traceback (most recent call last):
  File "/home/cintranet/creme_crm-2.1/creme/creme_core/creme_jobs/base.py", line                                                                                                                                                              112, in execute
    self._execute(job)
  File "/home/cintranet/creme_crm-2.1/creme/creme_core/creme_jobs/mass_import.py                                                                                                                                                             ", line 62, in _execute
    form.process(job)
  File "/home/cintranet/creme_crm-2.1/creme/creme_core/forms/mass_import.py", li                                                                                                                                                             ne 1132, in process
    for i, line in enumerate(filter(None, lines), start=1):
  File "/home/cintranet/creme_crm-2.1/creme/creme_core/utils/xlrd_utils.py", lin                                                                                                                                                             e 91, in __next__
    return next(self._calc)
  File "/home/cintranet/creme_crm-2.1/creme/creme_core/utils/xlrd_utils.py", lin                                                                                                                                                             e 85, in <genexpr>
    self._calc = ([parse(cell) for cell in sheet.row(row_number)] for row_number                                                                                                                                                              in range(sheet.nrows))
  File "/home/cintranet/creme_crm-2.1/creme/creme_core/utils/xlrd_utils.py", lin                                                                                                                                                             e 85, in <listcomp>
    self._calc = ([parse(cell) for cell in sheet.row(row_number)] for row_number                                                                                                                                                              in range(sheet.nrows))
  File "/home/cintranet/creme_crm-2.1/creme/creme_core/utils/xlrd_utils.py", lin                                                                                                                                                             e 73, in handle_cell
    return self._ctype_handlers.get(cell.ctype, self.default_handler)(cell)
  File "/home/cintranet/creme_crm-2.1/creme/creme_core/utils/xlrd_utils.py", lin                                                                                                                                                             e 67, in date_handler
    return datetime(*xldate_as_tuple(cell.value, self.datemode))
  File "/home/cintranet/venv_creme/lib/python3.5/site-packages/xlrd/xldate.py",                                                                                                                                                              line 116, in xldate_as_tuple
    raise XLDateAmbiguous(xldate)
xlrd.xldate.XLDateAmbiguous: 40.0

une idées SVP merci pour votre aide

Christophe


RE: importation en masse problème de date - christophe - 01-10-2020

J'ai trouvé le problème, il y a avait bien une date, mais elle était cachée Angry

nous continuons les tests

Merci
Christophe


RE: importation en masse problème de date - genglert - 02-10-2020

Je commençais à regarder votre stack trace quand j'ai vu que vous vous en étiez sorti seul haha.

Bon courage pour la suite !