Repository: spyder-ide/spyder

Issue:
Error when inserting text in code snippet
## Description

### What steps will reproduce the problem?

<!--- You can use Markdown here --->

I got this error while trying to write some code in Spyder

### Traceback
```python-traceback
  File "/home/carlos/Projects/spyder/github-repo/spyder/plugins/editor/extensions/snippets.py", line 229, in _on_key_pressed
    self._process_text(text)
  File "/home/carlos/Projects/spyder/github-repo/spyder/plugins/editor/extensions/snippets.py", line 52, in wrapper
    return f(self, *args, **kwargs)
  File "/home/carlos/Projects/spyder/github-repo/spyder/plugins/editor/extensions/snippets.py", line 237, in _process_text
    self.insert_text(text, line, column)
  File "/home/carlos/Projects/spyder/github-repo/spyder/plugins/editor/extensions/snippets.py", line 372, in insert_text
    if node.name == 'EPSILON':
AttributeError: 'TabstopSnippetNode' object has no attribute 'name'
```

## Versions

* Spyder version: 4.2.0.dev0 776c88479
* Python version: 3.7.7
* Qt version: 5.9.6
* PyQt5 version: 5.9.2
* Operating System: Linux 5.3.0-55-generic

### Dependencies

```

# Mandatory:
atomicwrites >=1.2.0           :  1.3.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.2.2 (OK)
diff_match_patch >=20181111    :  20181111 (OK)
intervaltree >=3.0.2           :  3.0.2 (OK)
IPython >=4.0                  :  7.18.1 (OK)
jedi =0.17.2                   :  0.17.2 (OK)
keyring >=17.0.0               :  18.0.0 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  0.9.1 (OK)
parso =0.7.0                   :  0.7.0 (OK)
pexpect >=4.4.0                :  4.7.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.6.3 (OK)
pygments >=2.0                 :  2.4.2 (OK)
pylint >=1.0                   :  2.4.4 (OK)
pyls >=0.35.0;<1.0.0           :  v4.1.5+606.g74b46cdeb (OK)
pyls_black >=0.4.6             :  0.4.6 (OK)
pyls_spyder >=0.1.1            :  0.1.1 (OK)
qdarkstyle >=2.8               :  2.8 (OK)
qtawesome >=0.5.7              :  0.6.0 (OK)
qtconsole >=4.7.7              :  4.7.7 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.8.3 (OK)
setuptools >=39.0.0            :  50.3.0.post20201006 (OK)
sphinx >=0.6.6                 :  2.2.1 (OK)
spyder_kernels >=1.9.4;<1.10.0 :  1.10.0.dev0 (OK)
three_merge >=0.1.1            :  0.1.1 (OK)
watchdog >=0.10.3              :  0.10.3 (OK)
xdg >=0.26                     :  0.26 (OK)
zmq >=17                       :  18.1.0 (OK)

# Optional:
cython >=0.21                  :  0.29.13 (OK)
matplotlib >=2.0.0             :  3.3.1 (OK)
numpy >=1.7                    :  1.19.2 (OK)
pandas >=1.1.1                 :  0.25.2 (NOK)
scipy >=0.17.0                 :  1.3.1 (OK)
sympy >=0.7.3                  :  1.5.1 (OK)
```



Discussion:

Resolving patch:
diff --git a/spyder/utils/snippets/nodes.py b/spyder/utils/snippets/nodes.py
--- a/spyder/utils/snippets/nodes.py
+++ b/spyder/utils/snippets/nodes.py
@@ -67,6 +67,8 @@ def __init__(self, position=((0, 0), (0, 0))):
         self.index_in_parent = -1
         self.to_delete = False
         self.depth = 0
+        self.name = ''
+        self.value = ''
 
     def update_position(self, position):
         """Updates node text position."""


Test patch: