PySide Code completion

Hi, I’m using Komodo Edit 8.5 and I’m trying to get PySide code completion working. It seems to recognize PySide, but I don’t see any libraries that I recognize.

I found this link via a google search, but it appears to be quite out of date and did not work for me.

http://community.activestate.com/node/7075

So I’m curious if someone can tell me how to get code completion working for PySide 1.2.2?

Thanks

Seems the enhancement request on this expired - https://bugs.activestate.com/show_bug.cgi?id=91015

You’re welcome to file it again (we’ve since moved to github) - https://github.com/Komodo/KomodoEdit/issues

Is PySide the “goto” library you use to work with QT using Python?

I don’t think I submitted that bug. But it’s good someone else did. But yes, PySide is the goto library being that I’m working with several 3D applications that utilize PySide (Maya, Modo, Nuke).

Hi, I’m still trying to find an answer to this. I’m starting to consider using other editors at this point since I use PySide all the time. I find a .cix file for PySide 1.1.1 but when I load it up to the API catalog nothing shows up for PySide.

Please help, I like Komodo and I would prefer not switching to Eclipse or something similar.

Oh, and I have transitioned to Komodo Edit 9.2.

One more note. This is the error I get when I try to load up the .cix firl for PySide which I found.

Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo Edit 9\lib\mozilla\components\koCatalogsTree.py", line 364, in run
    shutil.copy(src_path, dst_path)
  File "C:\Program Files (x86)\ActiveState Komodo Edit 9\lib\python\lib\shutil.py", line 119, in copy
    copyfile(src, dst)
  File "C:\Program Files (x86)\ActiveState Komodo Edit 9\lib\python\lib\shutil.py", line 69, in copyfile
    raise Error("`%s` and `%s` are the same file" % (src, dst))
Error: `C:\Users\jberkheimer\AppData\Local\ActiveState\KomodoEdit\9.2\apicatalogs\PySide-1.1.1.cix` and `C:\Users\jberkheimer\AppData\Local\ActiveState\KomodoEdit\9.2\apicatalogs\PySide-1.1.1.cix` are the same file

Hi @Berkyjay, could you provide a link to the PySide cix file you’re using?

Here ya go.

Note there is no open bug for PySide integration. The bug I referred to was on our old bug tracking system. If you want this tracked please report a bug on github.

@mitchell could you have a look at the cix file linked above and see if it could be made to work easily?

Hi,

Here’s what I did to get PySide completions:

  1. Download the referenced .cix file to a temporary directory.
  2. Open Komodo’s Code Intelligence preference and clicked “Add an API Catalog”.
  3. Select the .cix file in the temporary directory.
  4. Note that the file does not show up immediately in the view. This is a bug that will need to be looked into.
  5. Restart Komodo.
  6. Go back to Code Intelligence preference and PySide is now there in the tree view. Check it.
  7. Create a new Python file and added “import PySide” and then on a new line “PySide.” and I got a list of completions.

The cix file looks good.

@nathanr Thanks for the clarification.

@mitchell SO I went through these steps and restarted Komodo but PySide is still not showing up. I also checked my PySide install and I’m using version 1.2.2. Not sure if this matters or not.

I hope you can see the image clearly enough.

Could you see if anything shows up in your error log when you add the .cix file?

Also, please ensure you are running Komodo 9.2.

@nathanr The only time I get anything in the error log is if I select the .cix file from within the apicatalogs directory.

C:\Users\jberkheimer\AppData\Local\ActiveState\KomodoEdit\9.2\apicatalogs

If I select it from a directory from outside the komodo path I get nothing.

And yes, I am using 9.2.

What about at startup, after having selected the .cix file?

For a clean slate please delete the file from apicatalogs, shut down Komodo, edit your prefs.xml and remove any references to the file (make sure the XML structure remains valid), then start Komodo.

Cleaned everything out. Restarted…no errors. Redid the procedure…no errors. Restarted, no PySide API. :frowning:

@nathanr - Just an update, one of the guys at the Foundry helped me get code completion to work by giving me core libraries used by modo dumped to a dummy package as stub files. I place those in a PySide directory into this directory:

C:\Program Files (x86)\ActiveState Komodo Edit 9\lib\python\Lib\

and then set that path as an additional import directory for Python in Komodo.

It worked beautifully…sometimes. It will randomly stop doing ANY autocompletion. and the only way to get it back is to restart. Not sure what is going on, but I wanted to update you on it.

Could you add that info to the github issue?

Note you should not be modifying any files inside the Komodo application directory. You can place those library files anywhere on your system and point Komodo to them, they do not need to be inside of the app directory.

For the cix file, could you see if it works with Komodo IDE?

Could you add that info to the github issue?

Is there an issue opened for this? I never opened one myself. If there is do you have a link?

Note you should not be modifying any files inside the Komodo application directory. You can place those library files anywhere on your system and point Komodo to them, they do not need to be inside of the app directory.

This was the place I was recommended to put it. I moved it to a custom location outside of the Komodo directory structure and it still working…intermittently. I can’t really tell what’s causing the auto-completion to stop working. After a while it just stops.

For the cix file, could you see if it works with Komodo IDE?

I downloaded IDE and tried it but it’s still not working.

I figured you did when I asked you to. Please file one. I’m asking you rather than doing it myself because when I do it myself you will not be receiving updates.

By who?

That’s odd, considering it worked for Mitchell. Are you following his steps to the letter or is there something different about your setup?

I figured you did when I asked you to. Please file one. I’m asking you rather than doing it myself because when I do it myself you will not be receiving updates.

Sorry about that, it did slip my mind. I went ahead and made one.

By who?

One of the developers from the Foundry who works on Modo. I was talking to them about code completion for Modo and brought up PySide. He’s the one who made the PySide file dump for me.

That’s odd, considering it worked for Mitchell. Are you following his steps to the letter or is there something different about your setup?

Yup, I followed the steps you posted above. The file gets placed in the apicatalog directory. But still nothing when I restart.

It’s very kind of him to help, but as he is not a Komodo developer and I am I think you should take my word over his … :wink:

Could it be that the Python version you use has something to do with it? Have you tried both Python and Python 3?