Modify

Opened 3 years ago

Last modified 3 years 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

Description

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

Stacktrace:

Datei "/Library/Python/2.7/site-packages/trac/web/main.py", Zeile 647, in _dispatch_request
  dispatcher.dispatch(req)
Datei "/Library/Python/2.7/site-packages/trac/web/main.py", Zeile 248, in dispatch
  resp = chosen_handler.process_request(req)
Datei "/Library/Python/2.7/site-packages/trac/admin/web_ui.py", 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/admin_ui.py", Zeile 140, in render_admin_panel
  settings = self._process_import(req)
Datei "build/bdist.macosx-10.12-intel/egg/importexportxls/admin_ui.py", Zeile 517, in _process_import
  t.insert()
Datei "/Library/Python/2.7/site-packages/trac/ticket/model.py", Zeile 261, in insert
  db_values = self._to_db_types(self.values)
Datei "/Library/Python/2.7/site-packages/trac/ticket/model.py", 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/model.py", Zeile 63, in _datetime_to_db_str
  ts = to_utimestamp(dt)
Datei "/Library/Python/2.7/site-packages/trac/util/datefmt.py", Zeile 193, in to_utimestamp
  diff = dt - _epoc

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by Jun Omae

Trac Release: 1.2

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.