# Buggy code
def get_var_properties(self):
    """
    Get some properties of the variables in the current
    namespace
    """
    settings = self.namespace_view_settings
    if settings:
        ns = self._get_current_namespace()
        data = get_remote_data(
            ns, settings, mode="editable", more_excluded_names=EXCLUDED_NAMES
        )

        properties = {}
        for name, value in list(data.items()):
            properties[name] = {
                "is_list": isinstance(value, (tuple, list)),
                "is_dict": isinstance(value, dict),
                "len": self._get_len(value),
                "is_array": self._is_array(value),
                "is_image": self._is_image(value),
                "is_data_frame": self._is_data_frame(value),
                "is_series": self._is_series(value),
                "array_shape": self._get_array_shape(value),
                "array_ndim": self._get_array_ndim(value),
            }

        return properties
    else:
        return {}


# Traceback (SyntaxError)
File "/home/biomike/anaconda2/lib/python2.7/site-packages/qtconsole/base_frontend_mixin.py", line 163, in _dispatch
Traceback (most recent call last):
File "/home/biomike/anaconda2/lib/python2.7/site-packages/qtconsole/base_frontend_mixin.py", line 163, in _dispatch
handler(msg)
File "/home/biomike/anaconda2/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/namespacebrowser.py", line 214, in _handle_execute_reply
self.handle_exec_method(msg)
File "/home/biomike/anaconda2/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/shell.py", line 317, in handle_exec_method
properties = ast.literal_eval(data['text/plain'])
File "/home/biomike/anaconda2/lib/python2.7/ast.py", line 49, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/home/biomike/anaconda2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 9001
...}
^
SyntaxError: invalid syntax
handler(msg)
File "/home/biomike/anaconda2/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/namespacebrowser.py", line 214, in _handle_execute_reply
self.handle_exec_method(msg)
File "/home/biomike/anaconda2/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/shell.py", line 311, in handle_exec_method
view = ast.literal_eval(data['text/plain'])
File "/home/biomike/anaconda2/lib/python2.7/ast.py", line 49, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/home/biomike/anaconda2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 4001
...}
^
SyntaxError: invalid syntax

# Fixed code
def get_var_properties(self):
    """
    Get some properties of the variables in the current
    namespace
    """
    settings = self.namespace_view_settings
    if settings:
        ns = self._get_current_namespace()
        data = get_remote_data(
            ns, settings, mode="editable", more_excluded_names=EXCLUDED_NAMES
        )

        properties = {}
        for name, value in list(data.items()):
            properties[name] = {
                "is_list": isinstance(value, (tuple, list)),
                "is_dict": isinstance(value, dict),
                "len": self._get_len(value),
                "is_array": self._is_array(value),
                "is_image": self._is_image(value),
                "is_data_frame": self._is_data_frame(value),
                "is_series": self._is_series(value),
                "array_shape": self._get_array_shape(value),
                "array_ndim": self._get_array_ndim(value),
            }

        return repr(properties)
    else:
        return repr(None)