No auto-completion for python project in Gnome Builder

Hi all,

I’m trying to build my first Gtk/Gnome project with Gnome Builder. Gnome Builder created the base Python project for me and I can run it, so all the basics seems to be installed correctly. But I don’t get any auto-completion for Python.

As you can see at the screenshot I just always get the same basic “template”-suggestions but no real auto-completion of available methods.

image

Also no variable names, etc are auto-completed. For example, in the screenshot above I would expect that when I start typing “prefer” that the IDE would suggest to complete it to “preferencesButton”.

python3-jedi is installed.

Any idea what’s missing?

This might point me to the issue, but I don’t really get it. When I start Gnome Builder in the terminal I get this error message:

jedi not found, python auto-completion not possible.
cannot import name 'get_special_object' from 'jedi.evaluate.compiled' (/usr/lib/python3/dist-packages/jedi/evaluate/compiled/__init__.py)

Edit: It become even more strange. I just saw that there is an update for the python3-jedi and gnome-builder package (Debian unstable). So I thought I give it a try and installed the updates. Now the error on startup changed to:

jedi not found, python auto-completion not possible.
No module named 'jedi.evaluate'

Any ideas how to resolve this?

Thanks!

Jedi breaks their ABI faster than we can keep up with it. Either you need a much older jedi version, or you’ll have to help forward port the jedi plugin in Builder to match what your system supports.

This doesn’t sound to promising :cry:
Do you know which version is the last one which works? I’m running Gnome Builder version 3.34.1 and python3-jedi version 0.15.2

Btw, let me use the opportunity to say thank you for your work on Gnome Builder, it is really fun using it! :smile:

The last one I remember seeing working was 0.12.

The difficulty we had is that upstream did not want to accept patches to support GObject Introspection so Builder has to monkey patch it.

Personally, I’d like to see all this moved into a language server but I’m really hesitant to go tell people to use a Python language server controlled by a racist profiteer in the form of Palantir.

2 Likes

I installed now Python3-Jedi version 0.13.2 from Debian stable which seems to work. The error message is gone when I start Gnome Builder and I can auto-complete python methods. But for Gtk methods auto-completion still seems to be broken.

For example when I type:

button = Gtk.Button.new_with_label("button")
button.conn

I would expect that it auto-complete to button.connect()… but no method is suggested.

I suggest filing a bug, but there doesn’t seem to be anyone around with knowledge of how that stuff works so I imagine you’ll have to do some investigation into the jedi_plugin.py file in src/plugins/jedi

Thanks, I will open a bug report.

I use KDevelop, (its cool!) and Kate (amazing). But still, I want to replace them with GNOME’s packages. Hope it happens soon. Gedit is too basic but its fast, I use it when I want a quick note take. All the best guys. Cheers GNOME !

There is another one, by Microsoft

Might be an option.

That sounds like a great idea. Let’s discuss that further on the issue tracker.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.