Autocomplete in Python Debugger doesn't work at times

Hi Guys!

First post so apologies for any errors. I’m quite new to using Python in Rhino.

I’m just getting started with scripting and have noticed that at times the autocomplete feature in the debugger stops working. Not sure why this happens and any help would be much appreciated. On the other hand when I open a new blank script it seems to work there, but not on my existing work.

Cheers!

Hi

if you have a sample where it does not work, we might be able to pinpoint the issue or use the script to make sure this will work in newer versions.

I noticed that nested functions did not seem to help the autocomplete feature in the (editor), maybe that is one possibility.

Please let me know,

Giulio

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Apologies for the delay. It actually managed to work the other day so I was happy…And then today all of a sudden it stopped working. On the same script. A bit surprising! It’s a script that imports tonnes of stuff, so not sure if I’d be able to put it up here and it would work.

I’ve had the same issue on/off for as long as I can remember. Have tried toggling Intelliclunk and that doesn’t help. Fortunately, the sidebar is there in a pinch!

Yeah I’ve resorted to the sidebar when it doesn’t work! Cheers

I’ve been also having the problem, it’s difficult to understand what starts/ends it. Not sure if it’s helpful (old thread also), but most times saving/restarting rhino makes it work for me, as it seems that merely resetting the script engine is not enough to update what is importable or not. And import errors always play a part in my experience, especially if you move or rename a module you have imported and try to relink… Or if you write a temporarily invalid import (before you have opened the imported module or placed it in the right folder). In this case, sometimes autocomplete returned after I ran the script.

I’ve never seen the problem with non-import errors, neither with import errors within functions (but that makes some sense considering python actually imports only if/when the function is executed).

If you happen to have a sample of how to make it stop working, it would be good to help us understand it and repeat it. @alxksks

Hi,
I think this must be the simplest/quickest way, with a new project and two files -xx.py and yy.py- on the same directory (xx has import rhinoscriptsyntax as rs, yy random code).

If you open xx on the python editor, as you add/type import yy appears as an autocomplete option. But with enter, autocomplete stops working. If you run the script then autocomplete comes back but only if the script could run without errors.

Also, if you have xx as a read only file then nothing happens (so autocomplete doesn’t return), perhaps a read-only error/reminder message would be useful here. Not sure how much of all this is intentional, what perhaps gives a misleading impression is that with a new untitled script you can execute code without (the user at least) saving to a file, so you don’t initially expect the saving/read-only situation.
Thanks!