Bug report #13226

Processing fails to load with non-UTF8 character in local date

Added by Vincent Picavet almost 5 years ago. Updated almost 5 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/Core
Affected QGIS version:2.8.2 Regression?:No
Operating System:CentOS Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21287

Description

Hi,

Current time here is "mar. août 18 2015 15:42:04" ( given by datetime.datetime.now().strftime(u'%a %b %d %Y %H:%M:%S'.encode('utf-8')) )

When launching qgis, Processing fails to load in initGui, because it cannot convert this date string to UTF8 :
Impossible de charger l'extension processing provoque une erreur lors de l'appel de sa méthode initGui()

Traceback ( path edited)

Traceback (most recent call last):
  File "...qgis/python/qgis/utils.py", line 228, in startPlugin
    plugins[packageName].initGui()
  File "../.qgis2/python/plugins/processing/ProcessingPlugin.py", line 56, in initGui
    Processing.initialize()
  File "../.qgis2/python/plugins/processing/core/Processing.py", line 146, in initialize
    ProcessingLog.startLogging()
  File "../.qgis2/python/plugins/processing/core/ProcessingLog.py", line 56, in startLogging
    ProcessingLog.DATE_FORMAT).decode('utf-8') + '\
')
  File "../usr/local/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xfb in position 7: invalid start byte

Same error with 2.8.2 embedded Processing and Processing from plugin repository.

Associated revisions

Revision e8003f26
Added by Victor Olaya almost 5 years ago

[processing] write log dates in ISO format

fixes #13226

History

#1 Updated by Matthias Kuhn almost 5 years ago

  • Status changed from Open to Feedback

Does this still happen after 9fc1b48b?

#2 Updated by Victor Olaya almost 5 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF