Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-complete stops working in Python #297

Closed
clokep opened this issue May 27, 2015 · 10 comments
Closed

Auto-complete stops working in Python #297

clokep opened this issue May 27, 2015 · 10 comments

Comments

@clokep
Copy link

clokep commented May 27, 2015

The Python error log (slightly anonymized). I was working on a new file, had probably renamed classes a few times...

[2015-05-27 12:35:13,683] [INFO] Startup: Welcome to Komodo IDE 9.0.1 build 87208 (platform macosx, running on Darwin 14.3.0 version Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64)
[2015-05-27 12:35:13,683] [INFO] Startup: /opt/homebrew-cask/Caskroom/komodo-ide/9.0.1-87208/Komodo IDE 9.app/Contents/MacOS/komodo built on Thu Apr 16 13:18:49 2015
[2015-05-27 12:35:13,776] [WARNING] koInitService: Unable to determine the current locale settings, defaulting to mac-roman
[2015-05-27 12:35:14,011] [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
[2015-05-27 12:35:14,012] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'component' directive. (1) in file:///opt/homebrew-cask/Caskroom/komodo-ide/9.0.1-87208/Komodo%20IDE%209.app/Contents/Resources/extensions/scope-files@activestate.com/components/component.manifest:1
[2015-05-27 12:35:14,012] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'contract' directive. (1) in file:///opt/homebrew-cask/Caskroom/komodo-ide/9.0.1-87208/Komodo%20IDE%209.app/Contents/Resources/extensions/scope-files@activestate.com/components/component.manifest:2
[2015-05-27 12:35:14,012] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'interfaces' directive. (1) in file:///opt/homebrew-cask/Caskroom/komodo-ide/9.0.1-87208/Komodo%20IDE%209.app/Contents/Resources/extensions/scope-files@activestate.com/components/component.manifest:3
[2015-05-27 12:35:14,057] [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:15:1

[2015-05-27 12:35:14,136] [WARNING] console-logger: Expected end of value but found 'solid'.  Error in parsing value for 'border-width'.  Declaration dropped. (1) in chrome://global/skin/global.css:2308
[2015-05-27 12:35:14,159] [WARNING] console-logger: Expected end of value but found 'solid'.  Error in parsing value for 'border-width'.  Declaration dropped. (1) in chrome://global/skin/global.css:2308
[2015-05-27 12:35:14,219] [WARNING] console-logger: Unknown property 'border-radius-top-left'.  Declaration dropped. (1) in less://commando/skin/commando.less:18
[2015-05-27 12:35:14,220] [WARNING] console-logger: Unknown property 'border-radius-top-right'.  Declaration dropped. (1) in less://commando/skin/commando.less:19
[2015-05-27 12:35:14,476] [ERROR] console-logger: bad script XDR magic number (0) in :0
Traceback (most recent call last):
  File "", line 0, in 

[2015-05-27 12:35:14,526] [WARNING] keybindings: [Meta+Shift+Down] was used for 'cmd_selectDocumentHome', overriding to use 'cmd_selectDocumentEnd'
[2015-05-27 12:35:14,530] [WARNING] keybindings: [Meta+Shift+U] was used for 'cmd_convertLowerCase', overriding to use 'cmd_scope-sections'
[2015-05-27 12:35:16,563] [WARNING] root: ko.findresults was already loaded, re-creating it.

[2015-05-27 12:35:16,613] [DEBUG] places_js: waiting for document complete
[2015-05-27 12:35:18,245] [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:///opt/homebrew-cask/Caskroom/komodo-ide/9.0.1-87208/Komodo%20IDE%209.app/Contents/Resources/components/koamAddonManager.js:138
[2015-05-27 12:51:33,795] [ERROR] koCodeIntel:     INFO: eval 'help' at test_fields.py#27  <Trigger 'python-calltip-call-signature' at 427>
    INFO: start scope is (<blob 'test_fields'>, [])
    INFO: find 'help ...' starting at (<blob 'test_fields'>, []):
    DEBUG: 'help ...' from <from __future__ import absolute_import>?
    DEBUG: 'help ...' from <from unittest import TestCase>?
    DEBUG: 'help ...' from <from ..fields import Field>?
    INFO: is 'help' accessible on (<blob 'test_fields'>, [])? no
    INFO: is 'help' accessible on (<blob '*'>, [])? yes: <variable 'help'>
    DEBUG: _hit_from_citdl: first part: ['help'] -> (<variable 'help'>, (<blob '*'>, []))
    INFO: resolve '_Helper' type inference for <variable 'help'>:
    INFO: find '_Helper ...' starting at (<blob '*'>, []):
    INFO: is '_Helper' accessible on (<blob '*'>, [])? no
    ERROR: evaluating 'help' at test_fields.py#27: could not resolve first part of '_Helper'
[2015-05-27 12:54:04,014] [ERROR] koCodeIntel:     INFO: eval 'f.declared_fields' at test_fields.py#38  <Trigger 'python-complete-object-members' at 611>
    INFO: start scope is (<blob 'test_fields'>, ['Test1', 'test_ordered_fields'])
    INFO: find 'f ...' starting at (<blob 'test_fields'>, ['Test1', 'test_ordered_fields']):
    INFO: is 'f' accessible on (<blob 'test_fields'>, ['Test1', 'test_ordered_fields'])? yes: <variable 'f'>
    DEBUG: _hit_from_citdl: first part: ['f'] -> (<variable 'f'>, (<blob 'test_fields'>, ['Test1', 'test_ordered_fields']))
    DEBUG: _hit_from_citdl: resolve ['declared_fields'] on <variable 'f'> in (<blob 'test_fields'>, ['Test1', 'test_ordered_fields'])
    INFO: resolve getattr 'declared_fields' on <variable 'f'> in (<blob 'test_fields'>, ['Test1', 'test_ordered_fields']):
    INFO: resolve 'PreOrdered' type inference for <variable 'f'>:
    INFO: find 'PreOrdered ...' starting at (<blob 'test_fields'>, ['Test1', 'test_ordered_fields']):
    INFO: is 'PreOrdered' accessible on (<blob 'test_fields'>, ['Test1', 'test_ordered_fields'])? no
    INFO: is 'PreOrdered' accessible on (<blob 'test_fields'>, [])? yes: <class 'PreOrdered'>
    DEBUG: _hit_from_citdl: first part: ['PreOrdered'] -> (<class 'PreOrdered'>, (<blob 'test_fields'>, []))
    INFO: 'PreOrdered' is <class 'PreOrdered'> on (<blob 'test_fields'>, [])
    DEBUG: look for ['declared_fields'] from imports in <class 'PreOrdered'>
    INFO: is 'declared_fields' from base class: 'Field'?
    INFO: resolve 'Field' type inference:
    INFO: find 'Field ...' starting at (<blob 'test_fields'>, []):
    DEBUG: 'Field ...' from <from __future__ import absolute_import>?
    DEBUG: 'Field ...' from <from unittest import TestCase>?
    DEBUG: 'Field ...' from <from ..fields import Field>?
    INFO: is blob 'fields' from <Python curdirlib>? yes
    INFO: is 'Field' accessible on (<blob 'test_fields'>, [])? yes: <class 'Field'>
    DEBUG: _hit_from_citdl: first part: ['Field'] -> (<class 'Field'>, (<blob 'fields'>, []))
    INFO: 'Field' is <class 'Field'> on (<blob 'fields'>, [])
    INFO: resolve getattr 'declared_fields' on <class 'Field'> in (<blob 'fields'>, []):
    DEBUG: look for ['declared_fields'] from imports in <class 'Field'>
    INFO: is 'declared_fields' from base class: 'BaseField'?
    INFO: resolve 'BaseField' type inference:
    INFO: find 'BaseField ...' starting at (<blob 'fields'>, []):
    INFO: is 'BaseField' accessible on (<blob 'fields'>, [])? yes: <class 'BaseField'>
    DEBUG: _hit_from_citdl: first part: ['BaseField'] -> (<class 'BaseField'>, (<blob 'fields'>, []))
    INFO: 'BaseField' is <class 'BaseField'> on (<blob 'fields'>, [])
    INFO: resolve getattr 'declared_fields' on <class 'BaseField'> in (<blob 'fields'>, []):
    DEBUG: look for ['declared_fields'] from imports in <class 'BaseField'>
    INFO: is 'declared_fields' from base class: 'object'?
    INFO: resolve 'object' type inference:
    INFO: find 'object ...' starting at (<blob 'fields'>, []):
    DEBUG: 'object ...' from <from collections import OrderedDict>?
    INFO: is 'object' accessible on (<blob 'fields'>, [])? no
    INFO: is 'object' accessible on (<blob '*'>, [])? yes: <class 'object'>
    DEBUG: _hit_from_citdl: first part: ['object'] -> (<class 'object'>, (<blob '*'>, []))
    INFO: 'object' is <class 'object'> on (<blob '*'>, [])
    INFO: resolve getattr 'declared_fields' on <class 'object'> in (<blob '*'>, []):
    DEBUG: look for ['declared_fields'] from imports in <class 'object'>
    INFO: could not resolve classref 'object' on scoperef (<blob 'fields'>, [])
    INFO: could not resolve classref 'BaseField' on scoperef (<blob 'fields'>, [])
    INFO: could not resolve classref 'Field' on scoperef (<blob 'test_fields'>, [])
    ERROR: evaluating 'f.declared_fields' at test_fields.py#38: could not resolve 'declared_fields' getattr on <class 'PreOrdered'> in (<blob 'test_fields'>, [])

[...repeats a couple of times...]

[2015-05-27 14:15:04,834] [ERROR] find.dialog: 
-- EXCEPTION START --
TypeError: _ko.notifications is undefined
+ stack
    this.send@chrome://notify/content/sdk/notify.js:170:13
    Find_ReplaceAll@chrome://komodo/content/find/find_functions.js:1881:9
    replace_all@chrome://komodo/content/find/find2.js:819:30
    oncommand@chrome://komodo/content/find/find2.xul:1:1
-- EXCEPTION END --
[2015-05-27 14:16:16,519] [WARNING] root: ko.statusbar.AddMessage is deprecated, please use require("notify/notify").send() instead
    _addMessage@chrome://komodo/content/statusbar.js:468:1
    this.AddMessage@chrome://komodo/content/statusbar.js:516:5
    exports.ChangeTracker.prototype.onError@chrome://trackchanges/content/tracker.js:183:5

[2015-05-27 14:19:34,863] [ERROR] console-logger: TypeError: Argument 1 of Node.compareDocumentPosition is not an object. (2) in chrome://komodo/content/library/findController.js:307
Traceback (most recent call last):
  File "chrome://komodo/content/library/findController.js", line 307, in 

[...repeats 5 or so times...]
@Naatan
Copy link
Member

Naatan commented May 28, 2015

Given the timestamps I have doubts that these errors are relevant to your issue :(

Does codeintel still work for other languages when this problem occurs?

@clokep
Copy link
Author

clokep commented May 28, 2015

It seems to break for all languages, yes. (Just confirmed by opening a JavaScript file and Date. didn't offer suggestions. After restarting it did.)

@Naatan
Copy link
Member

Naatan commented Jun 30, 2015

Could you try deleting your codeintel folder from your profile folder while Komodo is not running?

Might be corrupted.

@clokep
Copy link
Author

clokep commented Jun 30, 2015

Tried it, I'll let you know if this continues to happen!

@clokep
Copy link
Author

clokep commented Jul 1, 2015

After trying the above, this seems to have come back...although I'm only running into the issue with certain modules right now.

[2015-07-01 13:20:54,588] [INFO] Startup: Welcome to Komodo IDE 9.1.0 build 87337 (platform macosx, running on Darwin 14.3.0 version Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64)
[2015-07-01 13:20:54,588] [INFO] Startup: /Applications/Komodo IDE 9.app/Contents/MacOS/komodo built on Fri May 29 20:57:45 2015
[2015-07-01 13:20:54,715] [WARNING] koInitService: Unable to determine the current locale settings, defaulting to mac-roman
[2015-07-01 13:20:55,005] [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
[2015-07-01 13:20:55,007] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'component' directive. (1) in file:///Applications/Komodo%20IDE%209.app/Contents/Resources/extensions/scope-files@activestate.com/components/component.manifest:1
[2015-07-01 13:20:55,007] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'contract' directive. (1) in file:///Applications/Komodo%20IDE%209.app/Contents/Resources/extensions/scope-files@activestate.com/components/component.manifest:2
[2015-07-01 13:20:55,008] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'interfaces' directive. (1) in file:///Applications/Komodo%20IDE%209.app/Contents/Resources/extensions/scope-files@activestate.com/components/component.manifest:3
[2015-07-01 13:20:55,060] [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:15:1

[2015-07-01 13:20:55,176] [WARNING] console-logger: Expected end of value but found 'solid'.  Error in parsing value for 'border-width'.  Declaration dropped. (1) in chrome://global/skin/global.css:2341
[2015-07-01 13:20:55,200] [WARNING] console-logger: Expected end of value but found 'solid'.  Error in parsing value for 'border-width'.  Declaration dropped. (1) in chrome://global/skin/global.css:2341
[2015-07-01 13:20:55,255] [WARNING] console-logger: Unknown property 'border-radius-top-left'.  Declaration dropped. (1) in less://commando/skin/commando.less:18
[2015-07-01 13:20:55,255] [WARNING] console-logger: Unknown property 'border-radius-top-right'.  Declaration dropped. (1) in less://commando/skin/commando.less:19
[2015-07-01 13:20:55,451] [ERROR] console-logger: bad script XDR magic number (0) in :0
Traceback (most recent call last):
  File "", line 0, in 

[2015-07-01 13:20:55,498] [WARNING] keybindings: [Meta+Shift+Down] was used for 'cmd_selectDocumentHome', overriding to use 'cmd_selectDocumentEnd'
[2015-07-01 13:20:55,503] [WARNING] keybindings: [Meta+Shift+U] was used for 'cmd_convertLowerCase', overriding to use 'cmd_scope-sections'
[2015-07-01 13:20:56,297] [WARNING] koLanguageServiceBase: Found non-positive guess
[2015-07-01 13:20:57,460] [WARNING] root: ko.findresults was already loaded, re-creating it.

[2015-07-01 13:20:57,488] [DEBUG] places_js: waiting for document complete
[2015-07-01 13:21:00,273] [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:///Applications/Komodo%20IDE%209.app/Contents/Resources/components/koamAddonManager.js:138
[2015-07-01 13:21:00,391] [ERROR] codeintel.oop.driver: common
Traceback (most recent call last):
  File "/Applications/Komodo IDE 9.app/Contents/Resources/python/komodo/codeintel2/oop/driver.py", line 564, in run
    handler.handleRequest(request, self)
  File "/Applications/Komodo IDE 9.app/Contents/Resources/python/komodo/codeintel2/oop/codebrowser.py", line 26, in handleRequest
    return meth(request, driver)
  File "/Applications/Komodo IDE 9.app/Contents/Resources/python/komodo/codeintel2/oop/codebrowser.py", line 36, in do_get_buffer
    if buf.scan_time is None and not buf.accessor.content:
  File "/Applications/Komodo IDE 9.app/Contents/Resources/python/komodo/codeintel2/citadel.py", line 171, in scan_time
    self._load_buf_data_once()
  File "/Applications/Komodo IDE 9.app/Contents/Resources/python/komodo/codeintel2/citadel.py", line 139, in _load_buf_data_once
    self._blob_from_lang_cache = self.mgr.db.get_buf_data(self)
  File "/Applications/Komodo IDE 9.app/Contents/Resources/python/komodo/codeintel2/database/database.py", line 1032, in get_buf_data
    return self._get_lang_zone(buf.lang).get_buf_data(buf)
  File "/Applications/Komodo IDE 9.app/Contents/Resources/python/komodo/codeintel2/database/langlib.py", line 808, in get_buf_data
    dbsubpath = join(dhash, dbfile_from_blobname[blobname])
KeyError: u'common'

I see this last KeyError repeated a bunch of times.

E.g. common will not autocomplete (I've imported common from somewhere). I also have another module defer that I've imported, auto-complete for that one still works fine. I'm using a virtualenv, which I have Komodo pointed to as part of it's project settings.

@Naatan
Copy link
Member

Naatan commented Jul 1, 2015

Any chance you could share a module that produces this error?

@clokep
Copy link
Author

clokep commented Jul 1, 2015

I'll check if it happens at some point with something open source.

@hobbsd
Copy link

hobbsd commented Oct 14, 2015

Codeintel stops working for me, too, but it's sporadic (happened again yesterday), and I haven't figured out the circumstances. It appears to be unrelated to the file I'm working on, so I don't know how to reproduce. Next time it happens I'll see if I can find any hints.

Komodo Edit, version 9.2.1, build 15998, platform win32-x86.
Built on Wed Sep 02 02:48:28 2015.

@clokep
Copy link
Author

clokep commented Sep 29, 2016

I don't think I've seen this since updating to Komodo 10! I'm going to close this.

@clokep clokep closed this as completed Sep 29, 2016
@th3coop
Copy link
Member

th3coop commented Sep 29, 2016

Hey thanks, this might have been resolved by #1350. Overall codeintel has had a lot of work done so it could just be more stable :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants