Coder Autocomplete Error

I just tried the new versions (2020.2.0 - 2020.2.2) and the Coder always throws following exception when executing ShowAutoCompleteList, which is pretty annoying because this bug occurs every time a dot is typed:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\wx\core.py”, line 3383, in
lambda event: event.callable(*event.args, **event.kw) )
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\coder\coder.py”, line 814, in ShowAutoCompleteList
None).completions(fuzzy=False)]
TypeError: completions() got an unexpected keyword argument ‘fuzzy’

1 Like

I think I’ve found the problem - the coder uses a package called Jedi to figure out autocompletion, however, this parameter fuzzy which it’s not liking is only valid syntax from version 0.15.2 onwards - the version we package with the standalone version is only 0.15.0 so that explains the error.

I’ll fix this for the next bug fix release (2020.2.3) but in the meantime you can manually upgrade Jedi from the command line. If you open Windows Command Line using right click and “Open As Administrator”, find where Psychopy is installed on your computer (most likely C://Program Files), o, then type into command line:
cd (your psychopy path)
then
python pip install --upgrade --target="(your psychopy path)/Lib/site-packages" jedi

This will install the latest version of Jedi to your Psychopy path, which should fix the problem (it did for me at least)

Thanks that’s the solution!

But in PyCharm (where i normally code) the installed version is listed as 1.3.3 and i can’t install 1.5.5. Upgrading to the newest version 1.7.2 also worked :+1:

Yep, any version after 0.15.2 should work :slight_smile: