No CallTips (Mac/Python)

Hi folks,

I upgraded to the IDE last month, and something has been bugging me that I couldn’t quite put my finger on given my experience with the Editor.

I realized yesterday that I don’t see CallTips. Editing the same modules in KIDE as the Editor application - Editor shows them, the IDE doesn’t.

I’ve downloaded the latest nightly, and this still is happening. I’ve checked the preferences, and CallTips are turned on. Anything else I might check, or gather data on?

Thanks for the help. I’m enjoying learning an IDE for the first time, and pretty happy with the results…

_KMP

I think you must attach log file. To see the folder where it’s placed, check Help - Troubleshooting - View Log File.
And do you set path to the interpreter in Preferences - Languages - Python (or Python3, if you use)?

Hi @Defman21,

Thanks - I’ll do that. I checked to see if there was anything informative there before posting, but it didn’t seem so; I’ll attach it a bit later.

I noticed the interpreter setting was ‘find in path’, but I set it manually as part of trying to figure this out, and it didn’t change the issue.

I suspect this is probably my error somewhere. It’s kind of strange that this ‘just works’ with the editor, but not the IDE. If I hadn’t become accustomed to it in Editor, I might not have even known it was there to miss!

Here’s the content of the log file:

[2014-06-22 16:06:42,319] [WARNING] koInitService: Unable to determine the current locale settings, defaulting to mac-roman
[2014-06-22 16:06:50,966] [DEBUG] places_js: waiting for document complete
[2014-06-22 16:06:51,011] [WARNING] root: ko.findresults was already loaded, re-creating it.

Now, I realized that I hadn’t checked the specific issues on another machine that I have KIDE installed on - and it turns out that these issues (and a couple of others I’ve noticed) don’t. So, I’ll play around with the usual suspects (preference files, trying running under other UIDs, etc.)

That’s all? All log? I can’t see errors/warnings about tooltip. Can you call a tooltip by Ctrl(Cmd)+J?

Hi KMP, I’m assuming you have Prefs > Code Intelligence > "Enable automatic autocomplete and calltip triggering while you type" enabled? Could you try closing Komodo and then deleting your codeintel folder from the same directory as where you found your log file? This should force Komodo to regenerate your codeintel database the next time you start Komodo.

Thanks @Defman21 and @nathanr for the help!

That was the entire log, yes. And no errors relating to the CallTips. I used the Help > Troubleshooting > View Log File command to view it, which pointed to ~/Library/Application Support/KomodoIDE/8.5/pystderr.log . There is also a codeintel.log file, which is empty (though the modification date is current).

Yes, the option for Enable automatic autocomplete... is enabled.

I deleted ~/Library/Application Support/KomodoIDE/8.5/codeintel and let KIDE recreate it. I can’t summon CallTips using cmd-J - and the menu item is “grayed out” (disabled).

If this still isn’t making sense, I have the prefs from my other installation that I could copy over to this machine and see whether that fixes things. But if you want to try to figure a root cause here, let me know what I can do next.

Oh, one more thing: though the log entries that I included previously were complete while the application is running, here’s more that happens when I quit KIDE:

[2014-06-24 09:52:04,953] [WARNING] views: Inconsistent view count in view_closed event
[2014-06-24 09:52:07,370] [ERROR] codeintel.komodo.KoCodeIntelBuffer: Error calling section_from_line callback
Traceback (most recent call last):
  File "/Applications/Komodo IDE 8.app/Contents/MacOS/components/koCodeIntel.py", line 1565, in invoke_callback
    callback.onGetSection(section)
  File "<XPCOMObject method 'onGetSection'>", line 3, in onGetSection
Exception: 2153185313 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)

Oops, I forgot that you use MacOS… Huh.
Anyway, try to reinstall Komodo IDE in another folder. I think codeintel installed with errors. And what mean “grayed out” (disabled)? Can you make a picture with this “grayed out” menu item? :smile:

Could you provide the “onGetSection” code snippet on which you were trying to trigger calltips, so that we may try and reproduce the issue?

Yep, MacOS. I can’t remember if Windows has a similar UI practice offhand.

Here’s an image:

I’m about to just kill the user-specific prefs file (the only thing that I really put time into is my keybindings, and I’ve saved that elsewhere) if I can’t help @nathanr with the info he wants. Then it would be reinstallation.

Nathan, I’ve no idea what onGetSection is - I think it’s in the KIDE code (and this log entry didn’t trigger until I exited the application. As you can see in my reply to @Defman21, I can’t even use a menu command to complete.

I think it’s time to trash all the prefs and let KIDE re-create them. I’ll do that later today if I don’t hear otherwise.

Thanks, both of you, for the help!

To test if clearing prefs would actually work you could simply run Komodo with a temporary clean profile, to do this execute the following from your command line:

export KOMODO_USERDATADIR=/tmp/komodo
open /Applications/Komodo\ IDE\ 8.app/Contents/MacOS/komodo

Okay, that’s weird.

I tried it, and it seemed to work - I see some CallTips. But: KIDE didn’t seem to actually use /tmp/komodo (nor did it create it, so I did); I checked and it’s empty.

After logoff/logon, launching it normally, I still have some CallTips. But, for example, in function code, where there’s a module-level import, I get autocomplete when typing the imported module name and imported function name, but I don’t get a CallTip when typing ( after the function name - though I do when typing the same code at the top level of the module.

There’s one new entry in the log:

[2014-06-25 20:52:05,819] [WARNING] codeintel.db: unexpected lang-zone db dir without 'lang' file: `/Users/kmp/Library/Application Support/KomodoIDE/8.5/codeintel/db/.DS_Store' (skipping)

So, I’ve now done a few other things…

  1. I’ve reinstalled KIDE.
  2. I trashed all preferences everything under ~/Library/Application Support, directories ‘KomodoIDE’ and ‘Komodo IDE’.

If I create a new file, not associated with a project, CallTips seem to work. If I edit a pre-existing file, CallTips work at the top level, but not within functions. So, for example, if at the top of the file I type os.open( I get a CallTip - but not if I do the same thing within a function.

I also notice that none of the functions that I define in my module produce CallTips when I go to call them elsewhere in the module. (However, completions seem to work fine for everything in almost all circumstances.)

Here are the other niggling things that I have happen:

  1. Sometimes, when starting KIDE, I get the tabs that I had open
    before, but the code sidebar is empty. Sometimes, there’s only the
    name of the module in the code sidebar, but there’s no disclosure
    triangle, and right-clicking does nothing. (For a while, closing/reopening the tab repopulated this.)
  2. Similarly the section list in the status bar has disappeared - but it’s back with the latest reinstall.
  3. Sometimes I’ll click on a local variable, and it
    will highlight (one-click) along with the other instances in the
    function. However, sometimes this doesn’t work - though it appears
    that if KIDE doesn’t find the definition for the variable, it
    doesn’t think it’s worth highlighting. I did have a few places
    where I defined a = b = c = 0 and this wasn’t accepted.

I kind of get the feeling that there’s something in my source or the way my project is set up that’s sufficiently unusual that it’s triggering a bug. Once again, there’s nothing else in the pystderr.log file, and the crash reports directory just has a placeholder in it.

My questions at this point are whether these issues are really defects or known problems? For example, I could see how the variable highlighting issue could be a feature, since if I click on a string and it doesn’t “take”, I’ve learned that might mean there’s a problem with it.

But, also, I’m wondering whether I need to do something more drastic to wipe my environment clean than reinstalling KIDE and trashing the files in ~/Library/Application Support/Komodo*. Or whether there are other logs or ways to debug. At this point, I’d be happy to have it just work, whatever I might need to do short of wiping the entire machine (which I may just do as a matter of course in the fall…)

Thanks for listening. Sorry for the bother here.

Just to confirm - these calltips not occurring only happens for you on IDE? You’ve tried the exact same code snippets on Edit and they work there?

Your issues do sound a bit weird and though they seem similar to bugs I’ve seen before I’ve never quite seen them the way you describe them. @toddw can you have a look ?

Sigh.

When I first started seeing this issue, it was because I’d been previously using Edit, and I realized that the behavior was different. But, I trashed all the preferences for both, and the apps as well, over the course of trying to figure this out. That’s the long way around saying that the two environments now (mis-) function identically.

The most concise way I can put what is still happening is that where I would expect a CallTip to come up doesn’t happen if I try it within a function, but does what I expect if I’m at the top level of a Python module. That’s the “always fails” behavior. I went through one last round of searching for logs, and there’s nothing more in pystderr.log that I indicated, and codeintel.log is empty. There are a bunch of logfiles called *.wakeups_resource.spin but I’ve no idea whether these are useful.

Ok so from what you’re saying it sounds your issue is different from what it was at the start of this thread (ie. IDE wasnt giving you ANY calltips and Edit was).

Could you please provide a snippet of code that reproduces your issue so we can validate whether this is a bug or a limitation?

Hi Nathan,

I’m stumped.

I figured you were going to ask that, so I ran some experiments. I created a new module, and couldn’t get the problem to occur. I copied one of the modules that was complaining to a new user environment, and started to pull code out of it to see if I could get to a point where it failed. I created two fairly small files, one of which fails to produce CallTips at a particular point, and the other of which didn’t - and the only difference was an extra \n before a variable assignment. In that environment, it was perfectly reproduceable.

Copied the two files to my original userid, and both worked. Took the original module, and started pulling code out of it until it worked - but I couldn’t get it to the point where I could make it fail at will.

I’d presume that its possible that a newly-created user might see the issue, but given that it seems to be sensitive to the spacing of lines in a file, I packaged them up with the original module for your convenience.

Again, thanks.

Just wanted to update this thread, and ask NathanR if he’d looked at the samples that I sent or had any further ideas.

This is one of this annoying things that I pick at every once in a while. I notice that others here have reported somewhat similar things happening with the UI.

I get the feeling that there must be something odd in the modules (files) I’m trying to edit, but what I’m really wondering is whether there’s any sort of instrumentation that I can enable to try to make sense of this. I’ve tried the latest nightly build, as well as a test build of V9 - with the same results.

I also realized that I hadn’t installed a library that I use (boto) on my local machine, so I did that. I now get (in my test module) the calling info for that API, which is helpful and seems to indicate that more expected functionality is working.

But today’s test is to start a new module, enter some meaningless code, and test whether I get calltips with info about a function that I’ve just defined - and it works - and then I paste in a class from one of my “real” files and while I get autocomplete (for the symbol) I don’t get any tooltip for that same function, even though I’m entering a nearly identical statement to the one immediately above that did work.

Also installed pylint while I am at it. No change to this behavior.

One more weird UI thing: I’d moved the code panel to the right pane early in my use of Edit, and I’ve been noticing that when I start KIDE with several open tabs from the last session the Code panel doesn’t populate - it just stays blank. This seemed to happen often, and I switched it back to the left pane and it seems to work more reliably.

And one more observation: I noticed some discussion about performance on Mac OS X. KIDE isn’t the snappiest app that I run, but my MBP (primary development machine) is pretty old, and nothing really runs fast. But - I’m wondering whether the problems that I’m seeing might indicate a resource issue that isn’t being detected by the app. I say this because I do see certain things take quite a while… I think using an old workstation for intensive work is sort of my issue, but it would be interesting to understand whether some of the functionality in question does time out, and that I lose this functionality as a result. (Note that I have verified the particular issues with missing calltips on another machine, also fairly old but with 8 cores and SSD.)

Sorry to be so aimlessly emitting things, but like I said, I wish I could be happier with the application, since in so many respects it’s a real help. Thanks for reading…

We were discussing an issue related to this last week, I’d be curious to see if it’s the same issue you’re facing.

The issue is that calltips are triggered at a very specific point, I’m going to use numbers here that may vary slightly but you’ll get the gest of it. Basically when typing myFunctionName the calltip is triggered on the 4th character (4th may vary per language), so you type myfu and it would show the calltip, after that if you continue to type myfunc it will filter down the already existing calltip (it does not trigger it again). If you were to change your cursor position or retype the word from a different position the calltip would be lost and would not trigger again unless you type the 4th character.

The reason for this is optimiation, we don’t want to perform expensive codeintel lookups each time you type a keystroke. The problem is that it’s not a transparent behavior, if you are not aware of the “trigger” method then it will just become frustrating to use in certain scenario’s. We are currently testing a few different things to solve this issue and hope to have something implemented in the Komodo 9 nightlies soon.

Another issue related to calltips that we are working to improve is that when you type for example classname.methodName and you remove methodName the calltip would not show unless you remove and retype the dot as well. this is also being fixed but might be something you’re currently facing.

Do these usability issues sound familiar to you? Might those be the problem you are facing?