Opened 9 months ago

Last modified 9 months ago

#13953 new defect

TypeError: unsupported operand type(s) for -: 'unicode' and 'datetime.datetime'

Reported by: P. Koevesdi Owned by: ben_12
Priority: normal Component: ExportImportXlsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.2


I get the above error when trying to import from Excel file containing 2018-12-31 into custom field of type time. The preview renders the field content as 12/31/18


Datei "/Library/Python/2.7/site-packages/trac/web/", Zeile 647, in _dispatch_request
Datei "/Library/Python/2.7/site-packages/trac/web/", Zeile 248, in dispatch
  resp = chosen_handler.process_request(req)
Datei "/Library/Python/2.7/site-packages/trac/admin/", Zeile 114, in process_request
  provider.render_admin_panel(req, cat_id, panel_id, path_info)
Datei "build/bdist.macosx-10.12-intel/egg/importexportxls/", Zeile 140, in render_admin_panel
  settings = self._process_import(req)
Datei "build/bdist.macosx-10.12-intel/egg/importexportxls/", Zeile 517, in _process_import
Datei "/Library/Python/2.7/site-packages/trac/ticket/", Zeile 261, in insert
  db_values = self._to_db_types(self.values)
Datei "/Library/Python/2.7/site-packages/trac/ticket/", Zeile 405, in _to_db_types
  values[field] = _datetime_to_db_str(value, is_custom_field)
Datei "/Library/Python/2.7/site-packages/trac/ticket/", Zeile 63, in _datetime_to_db_str
  ts = to_utimestamp(dt)
Datei "/Library/Python/2.7/site-packages/trac/util/", Zeile 193, in to_utimestamp
  diff = dt - _epoc

Attachments (0)

Change History (1)

comment:1 Changed 9 months ago by Jun Omae

Trac Release: 1.2

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain ben_12.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.