Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.15k stars 301 forks source link

UnicodeDecodeError: 'utf8' codec can't decode byte 0xc0 in position 20: invalid start byte #2622

Open matkoniecz opened 7 years ago

matkoniecz commented 7 years ago

Short Summary

Searching in files is not working (invalid start byte)

Steps to Reproduce

ctrl-f

Expected results

it works

Actual results

it outputs error

Platform Information

Komodo Edit or IDE? ActiveState Komodo Edit Komodo Version? Komodo Edit, version 10.1.4, build 17456, platform linux-x86. Built on Fri Dec 16 18:34:12 2016. Operating System (and version)? Ubuntu 14.04 32 bit

Additional Information

~/.komodoedit/10.1/pystderr.log

[2017-05-23 19:08:02,291] [INFO] Startup: Welcome to Komodo Edit 10.1.4 build 17456 (platform linux-x86, running on Linux 3.13.0-119-generic version #166-Ubuntu SMP Wed May 3 12:19:45 UTC 2017)
[2017-05-23 19:08:02,292] [INFO] Startup: /usr/bin/python built on Fri Dec 16 18:34:12 2016
[2017-05-23 19:08:02,445] [INFO] koInitService: Setting LC_CTYPE to utf-8
[2017-05-23 19:08:03,089] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in resource://gre/modules/Preferences.jsm:381
[2017-05-23 19:08:03,288] [WARNING] console-logger: Expected identifier for pseudo-class or pseudo-element but found ' '.  Ruleset ignored due to bad selector. (1) in chrome://komodo/skin/codeintel.css:1
[2017-05-23 19:08:03,289] [WARNING] console-logger: Unexpected end of file while searching for closing } of invalid rule set. (1) in chrome://komodo/skin/codeintel.css:42
[2017-05-23 19:08:03,368] [WARNING] root: ko.logging has been converted to a CommonJS module; use require("ko/logging") instead (since Komodo 9.0.0a1).
    @chrome://komodo/content/komodo.js:48:1

[2017-05-23 19:08:04,911] [WARNING] keybindings: [F1] was used for 'cmd_helpHelp', overriding to use 'cmd_toggleInteractiveShell'
[2017-05-23 19:08:04,913] [WARNING] keybindings: [Ctrl+0] was used for 'cmd_goToQuickBookmark_0', overriding to use 'cmd_fontZoomReset'
[2017-05-23 19:08:05,607] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_4'
[2017-05-23 19:08:05,608] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_5'
[2017-05-23 19:08:05,608] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_2'
[2017-05-23 19:08:05,608] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_3'
[2017-05-23 19:08:05,610] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_1'
[2017-05-23 19:08:05,610] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_change'
[2017-05-23 19:08:05,611] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'spelling_error'
[2017-05-23 19:08:05,611] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_local_change'
[2017-05-23 19:08:05,848] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_4'
[2017-05-23 19:08:05,849] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_5'
[2017-05-23 19:08:05,849] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_2'
[2017-05-23 19:08:05,849] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_3'
[2017-05-23 19:08:05,850] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_1'
[2017-05-23 19:08:05,851] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_change'
[2017-05-23 19:08:05,851] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'spelling_error'
[2017-05-23 19:08:05,851] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_local_change'
[2017-05-23 19:08:06,308] [INFO] koInitService: Adding pre startup service for 'koFileStatusService': '@activestate.com/koFileStatusService;1'
[2017-05-23 19:08:06,499] [INFO] elastic_tabstops: Elastic tabstops loaded.
[2017-05-23 19:08:06,638] [ERROR] CT::margin.js: couldn't get the insert-color
-- EXCEPTION START --
TypeError: this.view.scheme.getInterfaceStyleRaw is not a function
+ stack
    exports.MarginController.prototype._initMarkerStyles@chrome://trackchanges/content/margin.js:53:32
    refreshMarginProperies@chrome://trackchanges/content/margin.js:110:9
    MarginController@chrome://trackchanges/content/margin.js:41:5
    exports.ChangeTracker.prototype.changeTrackingOn@chrome://trackchanges/content/tracker.js:63:19
    ChangeTracker@chrome://trackchanges/content/tracker.js:27:5
    this.onViewOpenedHandler@chrome://trackchanges/content/trackchanges.js:88:26
    this.init/<@chrome://trackchanges/content/trackchanges.js:49:13
    this.init@chrome://trackchanges/content/trackchanges.js:46:1
    xtk.domutils.fireEvent@chrome://xtk/content/domutils.js:187:5
    onloadDelay/<@chrome://komodo/content/komodo.js:464:9
-- EXCEPTION END --
[2017-05-23 19:08:06,688] [ERROR] CT::margin.js: couldn't get the delete-color
-- EXCEPTION START --
TypeError: this.view.scheme.getInterfaceStyleRaw is not a function
+ stack
    exports.MarginController.prototype._initMarkerStyles@chrome://trackchanges/content/margin.js:59:32
    refreshMarginProperies@chrome://trackchanges/content/margin.js:110:9
    MarginController@chrome://trackchanges/content/margin.js:41:5
    exports.ChangeTracker.prototype.changeTrackingOn@chrome://trackchanges/content/tracker.js:63:19
    ChangeTracker@chrome://trackchanges/content/tracker.js:27:5
    this.onViewOpenedHandler@chrome://trackchanges/content/trackchanges.js:88:26
    this.init/<@chrome://trackchanges/content/trackchanges.js:49:13
    this.init@chrome://trackchanges/content/trackchanges.js:46:1
    xtk.domutils.fireEvent@chrome://xtk/content/domutils.js:187:5
    onloadDelay/<@chrome://komodo/content/komodo.js:464:9
-- EXCEPTION END --[2017-05-23 19:08:06,743] [ERROR] CT::margin.js: couldn't get the change-color
-- EXCEPTION START --
TypeError: this.view.scheme.getInterfaceStyleRaw is not a function
+ stack
    exports.MarginController.prototype._initMarkerStyles@chrome://trackchanges/content/margin.js:65:33
    refreshMarginProperies@chrome://trackchanges/content/margin.js:110:9
    MarginController@chrome://trackchanges/content/margin.js:41:5
    exports.ChangeTracker.prototype.changeTrackingOn@chrome://trackchanges/content/tracker.js:63:19
    ChangeTracker@chrome://trackchanges/content/tracker.js:27:5
    this.onViewOpenedHandler@chrome://trackchanges/content/trackchanges.js:88:26
    this.init/<@chrome://trackchanges/content/trackchanges.js:49:13
    this.init@chrome://trackchanges/content/trackchanges.js:46:1
    xtk.domutils.fireEvent@chrome://xtk/content/domutils.js:187:5
    onloadDelay/<@chrome://komodo/content/komodo.js:464:9
-- EXCEPTION END --
[2017-05-23 19:08:06,801] [ERROR] CT::margin.js: couldn't get the insert-color
-- EXCEPTION START --
TypeError: this.view.scheme.getInterfaceStyleRaw is not a function
+ stack
    exports.MarginController.prototype._initMarkerStyles@chrome://trackchanges/content/margin.js:53:32
    refreshMarginProperies@chrome://trackchanges/content/margin.js:110:9
    MarginController@chrome://trackchanges/content/margin.js:41:5
    exports.ChangeTracker.prototype.changeTrackingOn@chrome://trackchanges/content/tracker.js:63:19
    ChangeTracker@chrome://trackchanges/content/tracker.js:27:5
    this.onViewOpenedHandler@chrome://trackchanges/content/trackchanges.js:88:26
    this.init/<@chrome://trackchanges/content/trackchanges.js:49:13
    this.init@chrome://trackchanges/content/trackchanges.js:46:1
    xtk.domutils.fireEvent@chrome://xtk/content/domutils.js:187:5
    onloadDelay/<@chrome://komodo/content/komodo.js:464:9
-- EXCEPTION END --
[2017-05-23 19:08:06,901] [ERROR] CT::margin.js: couldn't get the delete-color
-- EXCEPTION START --
TypeError: this.view.scheme.getInterfaceStyleRaw is not a function
+ stack
    exports.MarginController.prototype._initMarkerStyles@chrome://trackchanges/content/margin.js:59:32
    refreshMarginProperies@chrome://trackchanges/content/margin.js:110:9
    MarginController@chrome://trackchanges/content/margin.js:41:5
    exports.ChangeTracker.prototype.changeTrackingOn@chrome://trackchanges/content/tracker.js:63:19
    ChangeTracker@chrome://trackchanges/content/tracker.js:27:5
    this.onViewOpenedHandler@chrome://trackchanges/content/trackchanges.js:88:26
    this.init/<@chrome://trackchanges/content/trackchanges.js:49:13
    this.init@chrome://trackchanges/content/trackchanges.js:46:1
    xtk.domutils.fireEvent@chrome://xtk/content/domutils.js:187:5
    onloadDelay/<@chrome://komodo/content/komodo.js:464:9
-- EXCEPTION END --
[2017-05-23 19:08:06,986] [ERROR] CT::margin.js: couldn't get the change-color
-- EXCEPTION START --
TypeError: this.view.scheme.getInterfaceStyleRaw is not a function
+ stack
    exports.MarginController.prototype._initMarkerStyles@chrome://trackchanges/content/margin.js:65:33
    refreshMarginProperies@chrome://trackchanges/content/margin.js:110:9
    MarginController@chrome://trackchanges/content/margin.js:41:5
    exports.ChangeTracker.prototype.changeTrackingOn@chrome://trackchanges/content/tracker.js:63:19
    ChangeTracker@chrome://trackchanges/content/tracker.js:27:5
    this.onViewOpenedHandler@chrome://trackchanges/content/trackchanges.js:88:26
    this.init/<@chrome://trackchanges/content/trackchanges.js:49:13
    this.init@chrome://trackchanges/content/trackchanges.js:46:1
    xtk.domutils.fireEvent@chrome://xtk/content/domutils.js:187:5
    onloadDelay/<@chrome://komodo/content/komodo.js:464:9
-- EXCEPTION END --
[2017-05-23 19:08:07,485] [ERROR] console-logger: TypeError: document.getElementById(...) is null (2) in chrome://analytics/content/analytics.js:137
Traceback (most recent call last):
  File "chrome://analytics/content/analytics.js", line 137, in 

[2017-05-23 19:08:09,205] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in file:///home/mateusz/Install/Komodo-Edit-10/lib/mozilla/components/koamAddonManager.js:138
[2017-05-23 19:08:09,943] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_4'
[2017-05-23 19:08:09,943] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_5'
[2017-05-23 19:08:09,943] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_2'
[2017-05-23 19:08:09,943] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_3'
[2017-05-23 19:08:09,945] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_cursor_1'
[2017-05-23 19:08:09,945] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_remote_change'
[2017-05-23 19:08:09,946] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'spelling_error'
[2017-05-23 19:08:09,946] [WARNING] koScintillaSchemeService: applyScheme:: no indicator for name 'collab_local_change'
[2017-05-23 19:08:09,980] [INFO] koInitService: Adding pre startup service for 'KoMemoryReporter': '@activestate.com/koMemoryReporter;1'
[2017-05-23 19:08:09,983] [INFO] koInitService: Adding pre startup service for 'koCommandmentService': '@activestate.com/koCommandmentService;1'
[2017-05-23 19:08:15,019] [WARNING] console-logger: Key event not available on GTK2: key="u" modifiers="control,shift" (1) in chrome://komodo/content/komodo.xul:0
[2017-05-23 19:08:15,023] [WARNING] console-logger: Key event not available on some keyboard layouts: key="w" modifiers="control,alt" (1) in chrome://komodo/content/komodo.xul:0
[2017-05-23 19:08:15,028] [WARNING] console-logger: Key event not available on some keyboard layouts: key="n" modifiers="control,alt" (1) in chrome://komodo/content/komodo.xul:0
[2017-05-23 19:08:15,030] [WARNING] console-logger: Key event not available on some keyboard layouts: key="s" modifiers="control,alt" (1) in chrome://komodo/content/komodo.xul:0
[2017-05-23 19:08:15,033] [WARNING] console-logger: Key event not available on some keyboard layouts: key="d" modifiers="control,alt,shift" (1) in chrome://komodo/content/komodo.xul:0
Exception in thread Find/Replace Thread 1:
Traceback (most recent call last):
  File "/home/mateusz/Install/Komodo-Edit-10/lib/python/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/home/mateusz/Install/Komodo-Edit-10/lib/mozilla/components/koFinder.py", line 225, in run
    self._find_in_paths(self.regex, self.paths)
  File "/home/mateusz/Install/Komodo-Edit-10/lib/mozilla/components/koFinder.py", line 287, in _find_in_paths
    textInfoFactory=self.loadedFileTextFactory):
  File "/home/mateusz/Install/Komodo-Edit-10/lib/mozilla/python/komodo/findlib2.py", line 169, in grep
    for path in paths:
  File "/home/mateusz/Install/Komodo-Edit-10/lib/mozilla/python/komodo/findlib2.py", line 1561, in paths_from_path_patterns
    followlinks=follow_symlinks):
  File "/home/mateusz/Install/Komodo-Edit-10/lib/mozilla/python/komodo/scandir.py", line 604, in walk
    for entry in scandir(top):
  File "/home/mateusz/Install/Komodo-Edit-10/lib/mozilla/python/komodo/scandir.py", line 583, in scandir_c
    name = name.decode(file_system_encoding)
  File "/home/mateusz/Install/Komodo-Edit-10/lib/python/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 0xc0 in position 20: invalid start byte
mitchell-as commented 7 years ago

Hi, it looks like you have a file whose name has an invalid UTF-8 character (the 20th character). Unfortunately, the log does not pinpoint this file, so you'll have to search for it yourself.

Ideally, Komodo would ignore incorrectly encoded filenames.

matkoniecz commented 7 years ago

As the first step it may mention in the log where search crashed. Also, if it it would mention what file caused it to crash or at least its location I would provide a testcase.