[BETA] Autocomplete issue on try/except blocks

If I am coding a try/except block, the IDE is quick to throw up errors for incomplete lines meaning I lose the autocomplete.

For example, I was doing this exact block :

try:
  json.loads(self.text_box_json.text)
except ValueError as e:
  alert("Invalid JSON")

As soon as I had typed in the “try:” and pressed enter the existing code below this new block got underlined as an error, meaning I had to type in the text box name without the autocomplete helping.

A workaround is to put passes as placeholders in the block and then go back and insert your code.

2 Likes

Hi @david.wylie,

Thanks for raising this. The autocompleter is getting better at coping with temporary syntax errors and I’ve added this one to our list.

1 Like

Thanks. I am wondering if my issue is more to do with the general typing delay, as often the actual text doesn’t appear on screen for a few seconds after typing it. Could that have a bearing on the time between me writing something and the temp. syntax error suppression timeout?