Code intelligence issue

I’m having an issue in Komdo 10 IDE where it’s not recognizing my custom Python module with code intelligence.

It’s giving me this notification:

evaluating ‘vismo’ at Python-1.py#3: could not find data for Python blob ‘vismo’ (error determining completions)

I thought at first it was because I have the module in a directory on another drive. So I moved it to my local drive but it still won’t work. The module is properly formatted with an init.py file.

Make sure Komodo knows how to find your custom module. You may need to add it’s parent directory to Preferences > Languages > Python > Additional Python Import Directories.

  • Carey

Yup, that’s the first thing I did.

Alright, next step would be to reset the code intel DB and let it rebuild. Help > Troubleshooting > Reset Codeintel Database

  • Carey

Unfortunately that didn’t work either.

Can you post some sort of code sample, directory structure, etc. that would aid us in reproducing the problem? As it stands there isn’t much else to go on. Thanks.

Did you wait for Code Intel to finish scanning your code before testing?

If none of this is working then we’ll need more info:

  • code sample

  • folder structure

  • exact Komodo version

  • Carey

Komodo IDE, version 10.1.3, build 89510, platform win32-x86. Built on Thu Dec 01 10:26:16 2016.

Here is my folder structure:

E:\Scripts\Modo\Kits\10xx\VISMO_Tools\pyscripts\vismo

Here is some sample code:

init.py

#
#   Copyright (c) 2001-2016, Viscira
#   All Rights Reserved. Patents granted and pending.
#

__version__ = "0.0.1"

from tools import *
from renderOutputData import *
from channelOptionLabels import *
from channelOptionCmds import *
from setup import *
from render import *

tools.py - I’ve copied the top portion of this file to include my testing function.

#!/usr/bin/env python

import lx, lxu.select
import modo
import os.path
import os, shutil, glob
import time
import re
import sys, string
import subprocess

lx.out("Tools Class 9xx")

class Tools(object):
    def __init__(self):
        self.outServer = "X:\\Optimus\\"
        
    def hello(self):
        return "Hello"

Hey guys, so I’m curious if there is any more info on this?

@Berkyjay,

I’m not able to reproduce an issue. Starting from a clean code intel folder and using your code structure and implementation I get completions for import vismo and it’s class and properties.

I never saw a response to this comment.

  • Carey

Yes, I waited for the scan to complete.

But I figured out what I was doing wrong. I was pointing directly to my module folder:

E:\Scripts\Modo\Kits\10xx\VISMO_Tools\pyscripts\vismo

But it should be like this:

E:\Scripts\Modo\Kits\10xx\VISMO_Tools\pyscripts

I had forgotten this and went back to my older Komodo Edit prefs to see how I did it. :confused:

Thanks for the help guys.

I did want to bring up a related problem that I’ve had for a while. I actually have an older thread about it. But I still have yet to be able to get PySide auto completion working. I was hoping that purchasing the Komodo IDE wouldn’t have this issue. So I was wondering if anything ever came of this.

Here is the original thread:

EDIT:

OK, nevermind. I downloaded the .cix file and tried again and now it’s working. I did notice that there is a size different between the old .cix file I had and the new one. So maybe someone fixed it.

I totally lied to you @Berkyjay. Through my testing I had made the same change as you found you had to make. I had places the vismo folder one more folder deep so Komodo would see it was a module dir. My bad for not remembering :frowning:

I also noted that your init file was names init.py but all the examples I found used __init__.py I haven’t confirmed if that matters from reading Python specs.

Re: your PySide question. It looks like you were asked several times to file a bug which doesn’t appear to ever have happened so no, there has been no work done on that. It looks like you got it working though so I’m not sure what the request is anymore. If you would like to follow up with that, file a bug: https://github.com/Komodo/KomodoEdit/issues/new

Make sure you reference the forum post in the report.

  • Carey

You beat me. OK sounds good. I’m glad you got it working. That thread is massive and has conflicting information so I’m not sure what ended up happening :frowning:

  • Carey

Yeah, it got confusing. But it’s all working great now. Thanks Carey!

1 Like

I’m having a similar issue, running Komodo 10.2.3 on Mac

I have a custom module, called escs_db. The directory structure looks like this:

  • escs_db
    -paper.py
    -journal.py

paper.py contains a class definition for Paper, which contains a number of methods.

When in a script I import escs_db, and later I type “escs_db.” the only autocomletes are all and doc, not paper, journal, etc. However, when I type “import escs_db.” then I see the relevant options (paper, journal, etc). If I have “import escs_db.paper” then later type “escs_db.paper.” I get the correct methods and class comletions (Paper, fetch_papers,…). It also works correctly if I have “from escs_db import paper” or “from escs_db.paper import Paper”. It is only when I have “import escs_db” that code intelligence fails.

I have verified that scripts calling escs_db.paper.fetch_papers() (for instance) do work correctly—it is just code intelligence that is failing. I have tried Troubleshooting|Reset CodeIntel Database. I have ~/GitHub as an additional Python 3 Import Directory in preferences. I have also tried ~/GitHub/escs_db without success.

When I try to invoke code intelligence I get the following error in Notifications:

evaluating ‘escs_db.paper’ at citation_analysis.py#5: could not resolve ‘paper’ getattr on <blob ‘init’> in (<blob ‘init’>, []) (error determining completions)