Fresh install of Komodo IDE 12: CodeIntel broken

Hi all,

I can’t get any autocompletions or calltips in PHP code using the latest version of Komodo IDE. I’ve tried completely resetting the CodeIntel DB, but it’s still broken. I’m seeing the same Failed calling API method: getCompletions error in the log that others have been reporting:

<1589236115> [2020-05-12 08:31:44,559] [ERROR]  JsonRPC: Failed calling API method: getCompletions
Traceback (most recent call last):
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/server/jsonrpc.py", line 59, in process
    result = method["function"](*request["params"])
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/service/__init__.py", line 71, in getCompletions
    completions = context.getCompletions()
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/legacy/php/scanner.py", line 1076, in getCompletions
    completions = super(PHPScopeCompletionContext, self).getCompletions()
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/completions.py", line 131, in getCompletions
    self.import_resolver.resolveImports(scope)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/common.py", line 703, in resolveImports
    self.resolveImport(symbol, scope)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/legacy/php/import_resolver.py", line 50, in resolveImport
    symbol = self._symbol_resolver.resolve(scope, import_symbol.type)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/common.py", line 863, in resolve
    self._import_resolver.resolveImports(scope)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/common.py", line 703, in resolveImports
    self.resolveImport(symbol, scope)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/legacy/php/import_resolver.py", line 50, in resolveImport
    symbol = self._symbol_resolver.resolve(scope, import_symbol.type)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/common.py", line 931, in resolve
    self._import_resolver.resolveImports(scope)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/common.py", line 703, in resolveImports
    self.resolveImport(symbol, scope)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/legacy/php/import_resolver.py", line 50, in resolveImport
    symbol = self._symbol_resolver.resolve(scope, import_symbol.type)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/common.py", line 931, in resolve
    self._import_resolver.resolveImports(scope)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/common.py", line 703, in resolveImports
    self.resolveImport(symbol, scope)
  File "/opt/komodo-ide/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/language/legacy/php/import_resolver.py", line 67, in resolveImport
    symbol = symbol.resolveMember(name_part)
AttributeError: '_Import' object has no attribute 'resolveMember'

Any assistance in fixing this bug would be greatly appreciated, as right now without CodeIntel working, the IDE is basically just a fancy text editor. Please let me know if you need any more info. I’m running on the latest version of KDE neon.

EDIT: And now they’ve suddenly started working, I don’t get it.

@colin, my guess is code intel was still scanning your code base when you were trying to use it, although that install path in your log output sets off alarm bells too.

How did you install Komodo? If you used sudo install.sh you need to make sure to change ownership back to your user (including your profile folder, ~/.komodoide/[version]).

If you used apt, I recommend you removed it and user install.sh.

  • Carey

Hi @careyh

Thanks for replying. I used sudo ./install.sh --install-dir /opt/komode-ide to install, so the install folder ownership is root:root like everything else in opt; I always did it this way with Komodo Edit as well and didn’t encounter any problems. The profile folder in my home dir has my user and group, so that’s fine. I should also clarify that I don’t run Komodo as root. Do I really need to change the install folder to my user and group? Many other programs install into opt with root permissions and run without issue.

It’s working again right now, but seems to be intermittent. If code intel was still scanning, nothing was reported in the IDE status. Thanks again for your help!

It’s caused issue for other users in numerous occasions but if it’s working for you then I wouldn’t worry about it, but be aware of it.

1 Like

Cool thanks. It’s only really me using Komodo on my PC anyway, so if nothing else works, I’ll try to install it again using my user and group and see if that improves things.