Code completion and linting stop working during the current session

After working for a while in Spyder at some point several functions just stop working:

Code folding
Code checking
Linting and Completion
Jump to definition (ctrl+g)

Often there is no error message, sometimes there is one that tells me that code completion and linting will not work in the current session or have stopped working. It tells me to make sure that my firewall or antivirus allow Python processes to open ports on my system or to restart Spyder.
I'm working at a company behind a company firewall with an Antivirus Software.
My question is now:

Why is it able to work for like 10 minutes before suddenly stopping? Apparently the local Python Language Server is working normally, so why does it suddenly stop?
Can this be solved using the Proxy-Settings in the preferences?

EDIT 1:
I played around with the advanced settings. In the end I enabled the usage of STDIO-Pipes and started Spyder with that option enabled. Performance was worse and the error also happened after a while, so I switched the option off and continued working. Apparently this restarted the language server and since then (about an hour ago) it has been running without fail. This makes it look more like the issue is not with my system's firewall or antivirus but some internal Spyder issue, maybe something that happens at startup?
EDIT 2:
After about 4 hours the error happend again. I did what I did above, go into the settings, activate STDIO-Pipes, then deactivate it again, now the server is running again normally.
 The error didn't reappear and I didn't have to rely on that workaround I described above so far.
Sadly I have no clue what caused that error as it appeared rather randomly, I can't reproduce it. It's possible that switching from working with one file to another makes it more probable to occur, but that's speculation now.

I think this is caused by the server crashing at some point in the background. Therefore, I'll add a menu entry so that users can manually restart the server in case that happens.
@Khris777, that's equivalent to the workaround you mentioned and it'll be available in our next version.

I am using Spyder 4.0 (conda install) and all autocomplete and code navigation "crashes" all the time. Although I see no error, it just stops working. I found a nice way to reproduce it in my code, but not as a snippet. My code is a python file which includes many packages and has functions in it. This is tested inside one of the functions. But as Spyder crashes all the time, I guess this is not specific to my large project:

write a line of code that has an error in it - red rectangle with an "x" is displayed
do some typing and autocompletion (also suppress some with ESC) after the error - works
do some typing and autocompletion before the line with an error - completion does not work any more
Now I could even fix the parse error - the red rectangle does not disappear, code completion does not work etc. Just like a pure notepad :)

After closing Spyder and launching again all is fine. I suspect that the the issue might be related with parsing a larger project + fast user actions. I have noticed that I've also been hitting Esc to suppress some completion and typed myself fast. So perhaps it just crashes when not being able to handle typing speed combined with complex code and possible syntax errors. As I said, doing exactly the same thing in a vanilla python file does not crash Spyder. If there is a way to log what happens, I am happy to reproduce and log :)

@martinrebane, please post an animated gif of the situation you described above because I don't understand it very well.

@ccordoba12 Yes, I made a screencast. While recording I saw that it is even more simple than that. Now I got it crashed just be producing syntax error while typing.
Here is the screen recording: https://youtu.be/GY_1hR5l8rc

First I type on line 141, completion works
When I start typing on line 143 you see that although syntax error mark appears, completion still works
by the time in am on line 144 I have corrected the syntax error (so the red mark should disappear), but it stays there. Also, code completion has stopped working when I am typing inside the print statement. I am also hitting ctrl+space there, nothing happens.

Please let me know if I can help any further!

Just in case, here are my settings for code completion:

While I had crashes last week, since monday I didn't have a single crash or problem anymore.
No idea why it's gone now.

I have the same problem constantly.  Mine does not go away.  Only fix is to restart Spyder.

Same problem here as described in OP. I also have the same problem that @martinrebane  describes.
Restarting Spyder fixes the issue for a short while. Some times its only minutes before the issue is back. Have tried resetting Spyder
Spyder 4.0.0
Python 3.7.5 64-bit | Qt 5.12.5 | PyQt5 5.12.3 | Windows 10

Just to add another - linter gets "stuck" thinking a variable is never used, even after it is, and even after its definition is commented entirely (which should yield a red marker): [lint_demo.mp4]  (https://www.dropbox.com/s/4j1brjukpple7if/lint_demo.mp4?dl=0) (note: using UTF-8 encoding)
Circumventable by cutting out a few lines above and below the offending one, and pasting back

Version 4.0.1, but still happens to me too - seemingly every single time I use Spyder. No idea how to produce it on purpose, other than just coding away for a while. Only fix I have found so far is to restart Spyder.

I saw issue #11501 and #11500 which I guess is the same as this issue, and has some more details.
Running Spyder with "--debug-info verbose" I get a different error (EOFError vs. ValueError) than #11501. Also with this level of debug enabled appears the language server restarts. So code completion, linting, go to definition etc keeps working but continues to crash repeatedly when trying to code complete. Same behavior with and without Kite enabled.
Running Spyder without debug it seems the language server just crashes and doesn't restart.

  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\function.py", line 311, in get_executed_params_and_issues
    return self.var_args.get_executed_params_and_issues(self)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\instance.py", line 530, in get_executed_params_and_issues
    return self._wrapped_arguments.get_executed_params_and_issues(execution_context)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\instance.py", line 54, in get_executed_params_and_issues
    execution_context.tree_node
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\debug.py", line 82, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 98, in search_params
    string_name=string_name,
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\utils.py", line 20, in wrapper
    return list(func(*args, **kwargs))
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 147, in _search_function_executions
    evaluator, random_context, compare_node, name, trailer):
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 202, in _check_name_for_execution
    for value in evaluator.goto_definitions(context, name):
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 280, in goto_definitions
    return helpers.evaluate_call_of_leaf(context, name)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\helpers.py", line 102, in evaluate_call_of_leaf
    values = context.eval_node(base)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 81, in eval_node
    return self.evaluator.eval_element(self, node)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 233, in eval_element
    return self._eval_element_if_evaluated(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 245, in _eval_element_if_evaluated
    return self._eval_element_cached(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 249, in _eval_element_cached
    return eval_node(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\debug.py", line 82, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 50, in wrapper
    return func(context, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 74, in eval_node
    return eval_atom(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 203, in eval_atom
    search_global=True
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 72, in py__getattribute__
    return f.find(filters, attribute_lookup=not search_global)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 67, in find
    types = self._names_to_types(names, attribute_lookup)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 190, in _names_to_types
    contexts = ContextSet.from_sets(name.infer() for name in names)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\common\context.py", line 32, in from_sets
    for set_ in sets:
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 190, in <genexpr>
    contexts = ContextSet.from_sets(name.infer() for name in names)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\names.py", line 226, in infer
    return self.get_param().infer()
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\names.py", line 229, in get_param
    params, _ = self.parent_context.get_executed_params_and_issues()
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\function.py", line 311, in get_executed_params_and_issues
    return self.var_args.get_executed_params_and_issues(self)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\instance.py", line 530, in get_executed_params_and_issues
    return self._wrapped_arguments.get_executed_params_and_issues(execution_context)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\instance.py", line 54, in get_executed_params_and_issues
    execution_context.tree_node
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\debug.py", line 82, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 98, in search_params
    string_name=string_name,
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\utils.py", line 20, in wrapper
    return list(func(*args, **kwargs))
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 147, in _search_function_executions
    evaluator, random_context, compare_node, name, trailer):
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 202, in _check_name_for_execution
    for value in evaluator.goto_definitions(context, name):
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 280, in goto_definitions
    return helpers.evaluate_call_of_leaf(context, name)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\helpers.py", line 105, in evaluate_call_of_leaf
    values = eval_trailer(context, values, trailer)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 167, in eval_trailer
    name_or_str=node
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 406, in py__getattribute__
    return ContextSet.from_sets(c.py__getattribute__(*args, **kwargs) for c in self._set)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\common\context.py", line 32, in from_sets
    for set_ in sets:
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 406, in <genexpr>
    return ContextSet.from_sets(c.py__getattribute__(*args, **kwargs) for c in self._set)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 72, in py__getattribute__
    return f.find(filters, attribute_lookup=not search_global)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 67, in find
    types = self._names_to_types(names, attribute_lookup)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 190, in _names_to_types
    contexts = ContextSet.from_sets(name.infer() for name in names)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\common\context.py", line 32, in from_sets
    for set_ in sets:
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 190, in <genexpr>
    contexts = ContextSet.from_sets(name.infer() for name in names)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\names.py", line 143, in infer
    return tree_name_to_contexts(parent.evaluator, parent, self.tree_name)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 604, in tree_name_to_contexts
    types = _remove_statements(evaluator, context, node, tree_name)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 544, in _remove_statements
    return eval_expr_stmt(context, stmt, seek_name=name)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 50, in wrapper
    return func(context, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 287, in eval_expr_stmt
    return _eval_expr_stmt(context, stmt, seek_name)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\debug.py", line 82, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 303, in _eval_expr_stmt
    context_set = context.eval_node(rhs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 81, in eval_node
    return self.evaluator.eval_element(self, node)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 233, in eval_element
    return self._eval_element_if_evaluated(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 245, in _eval_element_if_evaluated
    return self._eval_element_cached(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 249, in _eval_element_cached
    return eval_node(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\debug.py", line 82, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 50, in wrapper
    return func(context, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 87, in eval_node
    context_set = context.eval_node(first_child)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 81, in eval_node
    return self.evaluator.eval_element(self, node)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 233, in eval_element
    return self._eval_element_if_evaluated(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 245, in _eval_element_if_evaluated
    return self._eval_element_cached(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 249, in _eval_element_cached
    return eval_node(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\debug.py", line 82, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 50, in wrapper
    return func(context, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 74, in eval_node
    return eval_atom(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 203, in eval_atom
    search_global=True
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 72, in py__getattribute__
    return f.find(filters, attribute_lookup=not search_global)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 67, in find
    types = self._names_to_types(names, attribute_lookup)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 190, in _names_to_types
    contexts = ContextSet.from_sets(name.infer() for name in names)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\common\context.py", line 32, in from_sets
    for set_ in sets:
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 190, in <genexpr>
    contexts = ContextSet.from_sets(name.infer() for name in names)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\names.py", line 226, in infer
    return self.get_param().infer()
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\names.py", line 229, in get_param
    params, _ = self.parent_context.get_executed_params_and_issues()
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\function.py", line 311, in get_executed_params_and_issues
    return self.var_args.get_executed_params_and_issues(self)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\instance.py", line 530, in get_executed_params_and_issues
    return self._wrapped_arguments.get_executed_params_and_issues(execution_context)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\instance.py", line 54, in get_executed_params_and_issues
    execution_context.tree_node
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\debug.py", line 82, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 98, in search_params
    string_name=string_name,
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\utils.py", line 20, in wrapper
    return list(func(*args, **kwargs))
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 147, in _search_function_executions
    evaluator, random_context, compare_node, name, trailer):
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 202, in _check_name_for_execution
    for value in evaluator.goto_definitions(context, name):
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 280, in goto_definitions
    return helpers.evaluate_call_of_leaf(context, name)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\helpers.py", line 102, in evaluate_call_of_leaf
    values = context.eval_node(base)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 81, in eval_node
    return self.evaluator.eval_element(self, node)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 233, in eval_element
    return self._eval_element_if_evaluated(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 245, in _eval_element_if_evaluated
    return self._eval_element_cached(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 249, in _eval_element_cached
    return eval_node(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\debug.py", line 82, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 50, in wrapper
    return func(context, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 74, in eval_node
    return eval_atom(context, element)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 203, in eval_atom
    search_global=True
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 72, in py__getattribute__
    return f.find(filters, attribute_lookup=not search_global)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 67, in find
    types = self._names_to_types(names, attribute_lookup)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 190, in _names_to_types
    contexts = ContextSet.from_sets(name.infer() for name in names)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\common\context.py", line 32, in from_sets
    for set_ in sets:
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 190, in <genexpr>
    contexts = ContextSet.from_sets(name.infer() for name in names)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\names.py", line 226, in infer
    return self.get_param().infer()
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\names.py", line 229, in get_param
    params, _ = self.parent_context.get_executed_params_and_issues()
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\function.py", line 311, in get_executed_params_and_issues
    return self.var_args.get_executed_params_and_issues(self)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\instance.py", line 530, in get_executed_params_and_issues
    return self._wrapped_arguments.get_executed_params_and_issues(execution_context)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\instance.py", line 54, in get_executed_params_and_issues
    execution_context.tree_node
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\debug.py", line 82, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 98, in search_params
    string_name=string_name,
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\utils.py", line 20, in wrapper
    return list(func(*args, **kwargs))
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 147, in _search_function_executions
    evaluator, random_context, compare_node, name, trailer):
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\dynamic.py", line 202, in _check_name_for_execution
    for value in evaluator.goto_definitions(context, name):
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 280, in goto_definitions
    return helpers.evaluate_call_of_leaf(context, name)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\helpers.py", line 105, in evaluate_call_of_leaf
    values = eval_trailer(context, values, trailer)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\syntax_tree.py", line 167, in eval_trailer
    name_or_str=node
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 406, in py__getattribute__
    return ContextSet.from_sets(c.py__getattribute__(*args, **kwargs) for c in self._set)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\common\context.py", line 32, in from_sets
    for set_ in sets:
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 406, in <genexpr>
    return ContextSet.from_sets(c.py__getattribute__(*args, **kwargs) for c in self._set)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\base_context.py", line 72, in py__getattribute__
    return f.find(filters, attribute_lookup=not search_global)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 56, in find
    names = self.filter_name(filters)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 152, in filter_name
    for filter in filters:
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\finder.py", line 122, in _get_context_filters
    for f in self._context.get_filters(False, self._position, origin_scope=origin_scope):
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\module.py", line 102, in get_filters
    for star_filter in self.iter_star_filters():
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\module.py", line 140, in iter_star_filters
    for star_module in self.star_imports():
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\module.py", line 162, in star_imports
    modules += module.star_imports()
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\context\module.py", line 157, in star_imports
    level=i.level
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\imports.py", line 296, in follow
    ) for parent_module_context in context_set
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\imports.py", line 296, in <listcomp>
    ) for parent_module_context in context_set
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 139, in import_module
    sys_path, prefer_stubs=prefer_stubs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\plugins\flask.py", line 24, in wrapper
    return callback(evaluator, import_names, module_context, *args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\gradual\typeshed.py", line 110, in wrapper
    for p in parent_module_contexts
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\common\context.py", line 32, in from_sets
    for set_ in sets:
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\gradual\typeshed.py", line 110, in <genexpr>
    for p in parent_module_contexts
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\imports.py", line 436, in import_module
    is_package=is_pkg,
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\imports.py", line 457, in _load_python_module
    cache_path=settings.cache_directory
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 454, in parse
    return self.parse_and_get_code(*args, **kwargs)[0]
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\jedi\evaluate\__init__.py", line 451, in parse_and_get_code
    return grammar.parse(code=code, path=path, file_io=file_io, **kwargs), code
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\parso\grammar.py", line 78, in parse
    return self._parse(code=code, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\parso\grammar.py", line 105, in _parse
    module_node = load_module(self._hashed, file_io, cache_path=cache_path)
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\parso\cache.py", line 98, in load_module
    cache_path=cache_path
  File "C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\lib\site-packages\parso\cache.py", line 119, in _load_from_file_system
    module_cache_item = pickle.load(f)

EOFError: Ran out of input

@rhkarls, please open the Anaconda prompt and run there
conda install parso=0.5.2

That should fix your problem.

@rhkarls, please open the Anaconda prompt and run there
conda install parso=0.5.2

That should fix your problem.

Cheers @ccordoba12 ! I was already running with parso 0.5.2. I tried upgrading to 0.6, and I got the same ValueError as reported in #11501. I downgraded again to 0.5.2 and it appears to work now - at least it doesn't crash straight away. A lot of other packages were also down/upgraded in the process by conda, including jedi, the language server and spyder+kernels.

Glad to hear it was solved!

Glad to hear it was solved @rhkarls !

To note, I verified time and again that the more the total lines of code in all files opened, the sooner the linter's functionality degrades - worst-case, immediately

@OverLordGoldDragon, please don't start to comment in unrelated issues about your errors. Thanks!

@ccordoba12 The linked issue is directly related, if not a near-duplicate - I'm just adding information to a more active thread.

Sorry, I thought you were posting on a different issue.

Hi,
I have a similar problem. I updated to spyder 4 and now the right-click "Go to definition" doesn't work anymore. I have windows 10 and Anaconda environment. I also tried putting my project directory in the PYTHONPATH manager and it still doesn't work. Is there a solution for this issue? My project files are big and not having this feature is making it impossible to work. Any help would be greatly appreciated. Do I need to uninstall and re-install spyder 4?
I tried the solution mentioned above but it seems that parso is already installed for me. See below. How do I check the version of parso installed? And can I simply conda uninstall parso and then again conda install parso=0.5.2? Thanks again for your help!
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.```

I tried the solution mentioned above but it seems that parso is already installed for me. See below. How do I check the version of parso installed? And can I simply conda uninstall parso and then again conda install parso=0.5.2?

conda list parso to see the version, or in a python console import parso followed by parso.__version__
Try the commands you suggested. What worked for me, for some unexplained reason, was to install parso 0.6.0 and then downgrade to 0.5.2.

@rhkarls Thanks for the tips. I checked my parso version and indeed it was 0.5.2. So I tried to upgrade it first. So I ran conda update parso. And in the prompt it said that it would automatically downgrade spyder to 3.3.6. I accepted it and it works now. Today morning I had done conda update --all  to fix some issues with pyTorch and torchvision installs. And didn;t realize that spyder got updated to 4.0.1.
Strangely enough, parso was upgraded to 0.6.1 and spyder to 3.3.6...automatically without even me forcing it so. But now with the downgrade of the spyder it all works. I'll keep it that way until perhaps the issues with spyder 4.0.1 are resolved. Thanks again for your timely response!! Much appreciated.

just upgraded to spyder 4.1.1, windows 10 64b
it crashes every hour or so with this "completion and linting in the editor for python files will not work   ", suspect it is due to the integration with kite

suspect it is due to the integration with kite

No, it's not.

I'm also experiencing this issue. It's quite annoying as I have to run specific parts of my code again each time I restart, to load the example data I need to continue coding.
I have tried all the above solutions and none of them have worked so far. It just keeps crashing whenever I use Spyder 4.
Is there any update/solution in sight?

Try running Spyder with --debug-info verbose. It will nag you with crash report windows instead of just rolling over and dying.
If you also add --debug-output file, it will create a log file somewhere in your personal folder. Might be useful for tracking this further.

I am still getting spyder crashes every hour or so due to this problem, I did what matheger suggested  and started spyder in debug mode spyder --debug-info verbose:
now I get this on the issue reporter
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\star_args.py", line 188, in process_params
)), star_count=2):
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\utils.py", line 20, in wrapper
return list(func(*args, **kwargs))
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\star_args.py", line 187, in process_params
signature.get_param_names(resolve_stars=False)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\star_args.py", line 79, in _remove_given_params
for key, _ in arguments.unpack():
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\arguments.py", line 212, in unpack
arrays = self.context.infer_node(el)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 210, in infer_node
return infer_node(self, node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 148, in infer_node
return infer_node_if_inferred(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 161, in infer_node_if_inferred
return infer_node_cached(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\cache.py", line 42, in wrapper
rv = function(obj, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 166, in infer_node_cached
return infer_node(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\debug.py", line 82, in wrapper
return func(*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 62, in wrapper
return func(context, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 176, in infer_node
return infer_atom(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 301, in infer_atom
return context.py__getattribute(atom, position=position)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 75, in py__getattribute
values = ValueSet.from_sets(name.infer() for name in names)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\common\value.py", line 32, in from_sets
for set in sets:
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 75, in
values = ValueSet.from_sets(name.infer() for name in names)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\names.py", line 237, in infer
self.tree_name
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\plugins_init.py", line 21, in wrapper
return built_functions[name](*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\plugins\stdlib.py", line 827, in wrapper
return func(inference_state, context, tree_name)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 726, in tree_name_to_values
types = _remove_statements(context, node, tree_name)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 661, in _remove_statements
return infer_expr_stmt(context, stmt, seek_name=name)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 62, in wrapper
return func(context, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 370, in infer_expr_stmt
return _infer_expr_stmt(context, stmt, seek_name)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\debug.py", line 82, in wrapper
return func(*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 402, in _infer_expr_stmt
value_set = context.infer_node(rhs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 210, in infer_node
return infer_node(self, node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 148, in infer_node
return _infer_node_if_inferred(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 161, in _infer_node_if_inferred
return _infer_node_cached(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\cache.py", line 42, in wrapper
rv = function(obj, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 166, in _infer_node_cached
return _infer_node(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\debug.py", line 82, in wrapper
return func(*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 62, in wrapper
return func(context, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 189, in infer_node
value_set = context.infer_node(first_child)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 210, in infer_node
return infer_node(self, node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 148, in infer_node
return infer_node_if_inferred(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 161, in infer_node_if_inferred
return infer_node_cached(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\cache.py", line 42, in wrapper
rv = function(obj, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 166, in infer_node_cached
return infer_node(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\debug.py", line 82, in wrapper
return func(*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 62, in wrapper
return func(context, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 176, in infer_node
return infer_atom(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 301, in infer_atom
return context.py__getattribute(atom, position=position)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 75, in py__getattribute
values = ValueSet.from_sets(name.infer() for name in names)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\common\value.py", line 32, in from_sets
for set in sets:
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 75, in
values = ValueSet.from_sets(name.infer() for name in names)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\names.py", line 237, in infer
self.tree_name
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\plugins_init.py", line 21, in wrapper
return built_functions[name](*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\plugins\stdlib.py", line 827, in wrapper
return func(inference_state, context, tree_name)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 719, in tree_name_to_values
cn.infer(),
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 330, in infer
return self.context.infer_node(self.node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 210, in infer_node
return infer_node(self, node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 148, in infer_node
return infer_node_if_inferred(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 161, in infer_node_if_inferred
return infer_node_cached(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\cache.py", line 42, in wrapper
rv = function(obj, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 166, in infer_node_cached
return infer_node(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\debug.py", line 82, in wrapper
return func(*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 62, in wrapper
return func(context, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 200, in infer_node
value_set = infer_trailer(context, value_set, trailer)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 267, in infer_trailer
name_or_str=node
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 385, in py__getattribute
return ValueSet.from_sets(c.py__getattribute(*args, **kwargs) for c in self.set)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\common\value.py", line 32, in from_sets
for set in sets:
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 385, in
return ValueSet.from_sets(c.py__getattribute(*args, **kwargs) for c in self.set)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 88, in py__getattribute
names = self.goto(name_or_str, name_context, analysis_errors)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 77, in goto
names = finder.filter_name(filters, name_or_str)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\finder.py", line 36, in filter_name
for filter in filters:
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 63, in _get_value_filters
for f in self.get_filters(origin_scope=origin_scope):
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\filters.py", line 339, in get_filters
yield SpecialMethodFilter(self, self.overwritten_methods, self._wrapped_value)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\utils.py", line 75, in wrapper
return func(*args, **kwds)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\cache.py", line 143, in wrapper
result = method(self, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 295, in wrapped_value
return self.get_wrapped_value()
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\iterable.py", line 202, in get_wrapped_value
TupleGenericManager(self.get_generics())
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\iterable.py", line 194, in get_generics
return (self.merge_types_of_iterate().py__class(),)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 58, in merge_types_of_iterate
for lazy_value in self.iterate(contextualized_node, is_async)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\common\value.py", line 32, in from_sets
for set in sets:
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 57, in
lazy_value.infer()
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\iterable.py", line 261, in py__iter
for keys, values in self._iterate():
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\cache.py", line 42, in wrapper
rv = function(obj, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\utils.py", line 20, in wrapper
return list(func(*args, **kwargs))
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\iterable.py", line 170, in _iterate
for result in self._nested(comp_fors):
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\iterable.py", line 142, in _nested
input_types = parent_context.infer_node(input_node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 210, in infer_node
return infer_node(self, node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 148, in infer_node
return _infer_node_if_inferred(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 161, in _infer_node_if_inferred
return infer_node_cached(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\cache.py", line 42, in wrapper
rv = function(obj, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 166, in infer_node_cached
return infer_node(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\debug.py", line 82, in wrapper
return func(*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 62, in wrapper
return func(context, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 176, in infer_node
return infer_atom(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 301, in infer_atom
return context.py__getattribute(atom, position=position)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 43, in py__getattribute
names = self.goto(name_or_str, position)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 32, in goto
names = finder.filter_name(filters, name_or_str)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\finder.py", line 37, in filter_name
names = filter.get(string_name)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\filters.py", line 83, in get
**filter_kwargs
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\filters.py", line 122, in _filter
return list(self._check_flows(names))
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\filters.py", line 137, in _check_flows
origin_scope=self._origin_scope
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\flow_analysis.py", line 78, in reachability_check
return _break_check(context, value_scope, first_flow_scope, node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\flow_analysis.py", line 86, in _break_check
reachable = _check_if(context, check_node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\flow_analysis.py", line 113, in check_if
types = context.infer_node(node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 210, in infer_node
return infer_node(self, node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 148, in infer_node
return infer_node_if_inferred(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 161, in infer_node_if_inferred
return infer_node_cached(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\cache.py", line 42, in wrapper
rv = function(obj, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 166, in infer_node_cached
return infer_node(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\debug.py", line 82, in wrapper
return func(*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 62, in wrapper
return func(context, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 200, in infer_node
value_set = infer_trailer(context, value_set, trailer)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 267, in infer_trailer
name_or_str=node
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 385, in py__getattribute
return ValueSet.from_sets(c.py__getattribute(*args, **kwargs) for c in self.set)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\common\value.py", line 32, in from_sets
for set in sets:
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 385, in
return ValueSet.from_sets(c.py__getattribute(*args, **kwargs) for c in self.set)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 88, in py__getattribute
names = self.goto(name_or_str, name_context, analysis_errors)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 77, in goto
names = finder.filter_name(filters, name_or_str)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\finder.py", line 36, in filter_name
for filter in filters:
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 63, in _get_value_filters
for f in self.get_filters(origin_scope=origin_scope):
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\filters.py", line 339, in get_filters
yield SpecialMethodFilter(self, self.overwritten_methods, self._wrapped_value)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\utils.py", line 78, in wrapper
reraise(UncaughtAttributeError(exc_info[1]), exc_info[2])
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi_compatibility.py", line 298, in reraise
raise exception.with_traceback(traceback)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\utils.py", line 75, in wrapper
return func(*args, **kwds)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\cache.py", line 143, in wrapper
result = method(self, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\base_value.py", line 295, in _wrapped_value
return self._get_wrapped_value()
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\iterable.py", line 202, in _get_wrapped_value
TupleGenericManager(self.get_generics())
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\iterable.py", line 183, in get_generics
return tuple(c_set.py__class() for c_set in self.get_mapping_item_values())
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\iterable.py", line 560, in get_mapping_item_values
return self._dict_keys(), self._dict_values()
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\iterable.py", line 554, in _dict_values
return ValueSet.from_sets(lazy_value.infer() for lazy_value in self.dct.values())
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\common\value.py", line 32, in from_sets
for set in sets:
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\iterable.py", line 554, in
return ValueSet.from_sets(lazy_value.infer() for lazy_value in self._dct.values())
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\lazy_value.py", line 46, in infer
return self.context.infer_node(self.data)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 210, in infer_node
return infer_node(self, node)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 148, in infer_node
return _infer_node_if_inferred(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 161, in infer_node_if_inferred
return infer_node_cached(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\cache.py", line 42, in wrapper
rv = function(obj, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 166, in infer_node_cached
return infer_node(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\debug.py", line 82, in wrapper
return func(*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 62, in wrapper
return func(context, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 176, in infer_node
return infer_atom(context, element)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\syntax_tree.py", line 301, in infer_atom
return context.py__getattribute(atom, position=position)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 75, in py__getattribute
values = ValueSet.from_sets(name.infer() for name in names)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\common\value.py", line 32, in from_sets
for set in sets:
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\context.py", line 75, in
values = ValueSet.from_sets(name.infer() for name in names)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\names.py", line 446, in infer
values = dynamic_param_lookup(self.function_value, param.position_index)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\debug.py", line 82, in wrapper
return func(*args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\dynamic_params.py", line 47, in wrapper
return func(function_value, param_index)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\dynamic_params.py", line 92, in dynamic_param_lookup
arguments_list = _search_function_arguments(module_context, funcdef, string_name)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\cache.py", line 42, in wrapper
rv = function(obj, *args, **kwargs)
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\utils.py", line 20, in wrapper
return list(func(*args, **kwargs))
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\dynamic_params.py", line 132, in _search_function_arguments
inference_state, random_context, compare_node, name, trailer):
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\dynamic_params.py", line 198, in _check_name_for_execution
param_names = value.parent_context.get_param_names()
File "D:\Anaconda3\envs\py37\lib\site-packages\jedi\inference\value\instance.py", line 65, in get_param_names
self._function_value,
jedi.inference.utils.UncaughtAttributeError: 'AnonymousMethodExecutionContext' object has no attribute '_function_value'

I am still getting spyder crashes every hour or so due to this problem

Is that a hard crash (i.e. Spyder closes immediately)? Or does Spyder show the "Completion and linting stop working" message and open the issue reporter?

Try running Spyder with --debug-info verbose. It will nag you with crash report windows instead of just rolling over and dying.
If you also add --debug-output file, it will create a log file somewhere in your personal folder. Might be useful for tracking this further.

Thank you. But how exactly do I do that?

Thank you. But how exactly do I do that?

I've edited my post above with a howto. Hope it helps!

@ccordoba12

Is that a hard crash (i.e. Spyder closes immediately)? Or does Spyder show the "Completion and linting stop working" message and open the issue reporter?

if I am not in debug mode, I get the error and every time I try to write something the message pops up again , so I have to shutdown spyder and restart
if I am on debug mode the error report pops up and I can close it and continue

I also have this issue since upgrading to Spyder 4.1.1
Unluckily I cannot reproduce the error by doing something specific. It just happens after around 10 to 20 minutes of coding.

I hope this gets resolved.
This is getting a little intolerable that I have to restart spyder after hours of coding.

We are working on this to improve the current UI and also add the possibility of restarting the language server manually.

Adding to all of this, apart from often simply stopping to work without notice, sometimes it stops with that error message, and it will then spam the error message on every single keystroke.
Just saving my file provokes the error message to appear twice, so it becomes impossible to work and only a restart helps.

We are working on this to improve the current UI and also add the possibility of restarting the language server manually. The new release should be available next week.

Thanks for your efforts in sorting this out. The new linting and completion mechanisms will definitely be a step up when working properly. In the meantime is it possible to implement an option to use the old linter in Spyder 4 so that we can benefit from the other great features? I've found that linting fails after just a couple of minutes with just one relatively small file open. It sounds like the fixes you're working on won't solve the root problem and manually restarting the language server isn't going to be viable if it falls over every couple of minutes. I think if people can use the old linter it gives you more time to figure out all the issues.

Try running Spyder with --debug-info verbose. It will nag you with crash report windows instead of just rolling over and dying.
If you also add --debug-output file, it will create a log file somewhere in your personal folder. Might be useful for tracking this further.
HOWTO: Assuming you're on Windows 10: Pin Spyder to the taskbar, right-click on the taskbar symbol, select "Properties", and add --debug-info verbose to the end of the "Target:" field (after the path to spyder-script.py). Make sure that you leave a whitespace before the --debug-info, and between it and verbose.
Alternatively, open the Start Menu, type "Spyder", but don't run the program; instead, right-click on the Spyder entry and select "Open file location". This will open an Explorer window. In it, locate the shortcut to Spyder, select "Properties", and add --debug-info verbose to the "Target:" field.

Thanks. I've done this.
It has reduced the occurrence rate by quite a bit, but it has not completely resolved the issue.

Also thanks from my side!
Is there any quick fix for this? When coding heavily, this error appears more frequently than every 20 minutes. Having to clear the cache/variables etc. by restarting every few minutes totally kills my efficiency at work.
Is there any quick fix or a workaround by completely killing the linting? Otherwise I'll have to switch to PyCharm, which I'd like to avoid.

I just realized that my solution to start Spyder in debug mode fixed a different problem - that of random Spyder crashes - but not the one in the OP. I mistook one for the other because I never had the exact error message about linting/code completion and didn't read the description carefully enough. Today is the first time I ever saw it in person. I deleted my post above to not lead future readers astray.

The fix has been made and a new version coming next week. Thanks for the help debugging and your patience.

The fix has been made and a new version coming next week. Thanks for the help debugging and your patience.

Thanks a lot @goanpeca and @ccordoba12 !

To those interested in our solution, we've done the following to improve this annoying situation:

Add an option to never show the intrusive message again.

Add a mechanism that tries to detect if the server went down and try to automatically restart it.

Add a new entry to the status bar that shows the status of the server (starting, ready, restarting or down) and a menu entry that allows to restart it manually:

While those features may help, they seem to be only remedial to recover from the aftermath of the error. Do you have any idea yet why it happens in the first place?

While those features may help, they seem to be only remedial to recover from the aftermath of the error

Hopefully things will go unnoticed from now when the server stops working for most users because it'll be restarted by Spyder automatically.

Do you have any idea yet why it happens in the first place?

We're still investigating the issue.

Fair enough. Fingers crossed! Looking forward to the next update.

regarding the fix for next week that automatically restarts the server:  what happens to the workspace ? the variables that are in memory? will these values be lost?
Hope not, since that would mean restarting work every hour or so

regarding the fix for next week that automatically restarts the server: what happens to the workspace ? the variables that are in memory? will these values be lost?
Hope not, since that would mean restarting work every hour or so

I suspect not. There is a workaround (going into preferences, completion and linting, advanced, select 'use stdio pipes', apply, deselect use stdio pipes' again and apply) which effectively does the same (restarting the server), which has always worked for me so far and does not do anything to the workspace, variables, etc.

what happens to the workspace ? the variables that are in memory? will these values be lost?

@ricmarchao, the restart is done in place, so you don't need to restart Spyder and lose your work.

To those interested in our solution, we've done the following to improve this annoying situation:

Add an option to never show the intrusive message again.

Add a mechanism that tries to detect if the server went down and tries to automatically restart it.
Add a new entry to the status bar that shows the status of the server (starting, ready, restarting or down) and a menu entry that allows to restart it manually:

How to get that option?

Honest feedback for bughandling:
First of all I'd like to thank the Spyder team for the development of the IDE.
But for bugs which are imho critical, such as this bug, a fast merge-and-release cycle only for the critical bug should be aimed for. Since the patch is marked as merged since 4 days and there is no sign of a short-cycle release, I unluckily had to switch to PyCharm.  I know that this is a free software, but there is plenty of free software...

It'll be available in our 4.1.2 version, to be released in a couple of days.

Glad to know that and thanks for your effort.

While those features may help, they seem to be only remedial to recover from the aftermath of the error

Hopefully things will go unnoticed from now on when the server stops working for most users, because it'll be restarted by Spyder automatically.

Do you have any idea yet why it happens in the first place?

We're still investigating the issue.

Thanks for doing this. As a user though I do feel Spyder is getting quite slow and slightly delayed to work with, even with just typing code for example. Responsiveness in the program is really important and these kind of constant checks and workarounds can impact reliability of the program. Though I love Spyder, I am seriously close to changing IDE's as a result of the constant interruptions with this error, crashes and instability. Hope a true fix rather than workaround can be found?
Happy to help with anything.
Cheers
Peter

sudo -H pip3 install --upgrade parso seems to be a harsh workaround. It will install a wrong parso version 0.6.2 and give a warning at spyder startup. But after that no more annoyances for me. Probably some things won't work but I had deactivated everything already anyway.

While those features may help, they seem to be only remedial to recover from the aftermath of the error

Hopefully things will go unnoticed from now on when the server stops working for most users, because it'll be restarted by Spyder automatically.

Do you have any idea yet why it happens in the first place?

We're still investigating the issue.

Thanks for doing this. As a user though I do feel Spyder is getting quite slow and slightly delayed to work with, even with just typing code for example. Responsiveness in the program is really important and these kind of constant checks and workarounds can impact reliability of the program. Though I love Spyder, I am seriously close to changing IDE's as a result of the constant interruptions with this error, crashes and instability. Hope a true fix rather than workaround can be found?
 At least the variable memory will not be erased due to program crash.
Happy to help with anything.
Cheers
Peter

Same here. It was really nice to work with Spyder 2 and 3. Features might not have been complete and/or perfect, but Spyder was working nicely without crashing and/or slowing down. Code completition was not really functional at that time, but honestly: If you are used to coding, code completition will save you only a small amount of time (compared to slow-downs or crashes).
Starting with version 4 (or perhaps already somewhere at version 3), with each new version Spyder started to introduce more bugs than features. Imho the focus should for now should be on fixing all the bugs introduced by new (highly optional) features like Kite etc...
Over the last year in my workplace Spyder "acquired" a set of nicknames, of which "Cryder" (Crashy-Spyder) is one of the most favorable. Spyder went from being the most used Python IDE to a share of about 10%. PyCharm (and some others) have taken over. Unluckily I also had to move to PyCharm yesterday, since no changes seem to happen on this critical issues and otherwise my timeschedule would break my neck...
So imho to discourage people from changing to other IDEs, fixing bugs should be top priority over new features or improving features. And this also includes bug-handling procedures. F.i. the PR on this absolutely critical bug is marked as merged since almost 5 days, but no release has been made. But isn't fixing a critical bug the best reason ever to push an intermediate release, disregarding all planned PRs for the next release cycle?

While those features may help, they seem to be only remedial to recover from the aftermath of the error

Hopefully things will go unnoticed from now on when the server stops working for most users, because it'll be restarted by Spyder automatically.

Do you have any idea yet why it happens in the first place?

We're still investigating the issue.

Thanks for doing this. As a user though I do feel Spyder is getting quite slow and slightly delayed to work with, even with just typing code for example. Responsiveness in the program is really important and these kind of constant checks and workarounds can impact reliability of the program. Though I love Spyder, I am seriously close to changing IDE's as a result of the constant interruptions with this error, crashes and instability. Hope a true fix rather than workaround can be found?
 At least the variable memory will not be erased due to program crash.
Happy to help with anything.
Cheers
Peter

Same here. It was really nice to work with Spyder 2 and 3. Features might not have been complete and/or perfect, but Spyder was working nicely without crashing and/or slowing down. Code completition was not really functional at that time, but honestly: If you are used to coding, code completition will save you only a small amount of time (compared to the cost of slow-downs or crashes).
Starting with version 4 (or perhaps already somewhere at version 3), with each new version Spyder started to introduce more bugs than features. Imho the focus should for now should be on fixing all the bugs introduced by new (highly optional) features like Kite etc...
Over the last year in my workplace Spyder "acquired" a set of nicknames, of which "Cryder" (Crashy-Spyder) is one of the most favorable. Spyder went from being the most used Python IDE to a share of about 10%. PyCharm (and some others) have taken over. Unluckily I also had to move to PyCharm yesterday, since no changes seem to happen on this critical issues and otherwise my timeschedule would break my neck...
So imho to discourage people from changing to other IDEs, fixing bugs should be top priority over new features or improving features. And this also includes bug-handling procedures. F.i. the PR on this absolutely critical bug is marked as merged since almost 5 days, but no release has been made. But isn't fixing a critical bug the best reason ever to push an intermediate release, disregarding all planned PRs for the next release cycle?

Agree 100%.
Has this issue been opened as a separate issue to fully investigate and fix, or is the hacky dialog box really closing the issue?

To those interested in our solution, we've done the following to improve this annoying situation:

Add an option to never show the intrusive message again.

Add a mechanism that tries to detect if the server went down and tries to automatically restart it.
Add a new entry to the status bar that shows the status of the server (starting, ready, restarting or down) and a menu entry that allows to restart it manually:

How to get that option?

Ok thanks - it’s good the box can be disabled. At the moment, when one types even a single key (In the Non fixed version) the error message box comes up again and again. in the fix, if one disabled the box, can we be sure the program will not be constantly polling the external service?
Cheers

It's also worth noting that this error often occurs when one holds down backspace or deletes a lot of information in quick succession.

Same here. It was really nice to work with Spyder 2 and 3. ...
Starting with version 4 (or perhaps already somewhere at version 3), with each new version Spyder started to introduce more bugs than features. Imho the focus should for now should be on fixing all the bugs introduced by new (highly optional) features like Kite etc...

Please note that there were a lot of users wanting improved code completion and other new features. The Spyder 4 release was a massive overhaul of the code base. When you do such a large release with a relatively small team, naturally bugs will creep in. The Spyder team has worked very hard over the past couple of months on bug fixing to stabilize the 4.x series. 4.1.2 was tagged yesterday, and is now a PR on conda-forge that passes all CI - so should be available shortly.

Over the last year in my workplace Spyder "acquired" a set of nicknames, of which "Cryder" (Crashy-Spyder) is one of the most favorable. Spyder went from being the most used Python IDE to a share of about 10%. PyCharm (and some others) have taken over. Unluckily I also had to move to PyCharm yesterday, since no changes seem to happen on this critical issues and otherwise my timeschedule would break my neck...
So imho to discourage people from changing to other IDEs, fixing bugs should be top priority over new features or improving features. And this also includes bug-handling procedures. F.i. the PR on this absolutely critical bug is marked as merged since almost 5 days, but no release has been made. But isn't fixing a critical bug the best reason ever to push an intermediate release, disregarding all planned PRs for the next release cycle?

@JoElfner honestly, I don't think you understand what it takes to do a release of a package like Spyder. Speaking from experience as NumPy and SciPy release manager: it easily takes 1-2 days, and Spyder has a much more complex set of dependencies than NumPy/SciPy. @ccordoba12 and his team are working on this as hard as they can.
Please understand that comments like yours can be very demotivating, and are not really helpful. Community open source projects rely on a small number of maintainers, most of which are working very hard next to a day job or degree. If you want to help, please keep bug reports and comments constructive at a minimum. Contributing fixes or documentation, or donating (https://opencollective.com/spyder - $6500 yearly budget currently) would also be great to consider.

Agree 100%.

Please see my comment above @pbower

Has this issue been opened as a separate issue to fully investigate and fix, or is the hacky dialog box really closing the issue?

As @ccordoba12 said, the team is still investigating. The crashes are not in Spyder itself, so the current set of fixes (not just the dialog box, also auto-restarting) plus helping improve upstream projects seems like the right approach.

Agree 100%.

Please see my comment above @pbower

Has this issue been opened as a separate issue to fully investigate and fix, or is the hacky dialog box really closing the issue?

As @ccordoba12 said, the team is still investigating. The crashes are not in Spyder itself, so the current set of fixes (not just the dialog box, also auto-restarting) plus helping improve upstream projects seems like the right approach.

Thanks, appreciate your comments and the hard work from the team. The issue caused  my spyder instance to crash 20-30 times in the last 3 days for a project, so good that it’s being investigated and fixed.
I would love help out any way possible, I’m probably not experienced enough yet though.
You guys should be proud of the work that’s been done - the plotting stuff it does is brilliant now.
Cheers

I would love help out any way possible, I’m probably not experienced enough yet though.

Thanks for your offer @pbower. What we need is a simple, reproducible use case that generates this kind of errors, so we can debug them in our side.
So if you could give us a small, self-contained sample of your code that does that, we'd be really grateful.

You guys should be proud of the work that’s been done - the plotting stuff it does is brilliant now.

Thanks for your kind words @pbower!

Looking forward to all your efforts resolving this :)

I would love help out any way possible, I’m probably not experienced enough yet though.

Thanks for your offer @pbower. What we need is a simple, reproducible use case that generates this kind of errors, so we can debug them in our side.
So if you could give us a small, self-contained sample of your code that does that, we'd be really grateful.

You guys should be proud of the work that’s been done - the plotting stuff it does is brilliant now.

Thanks for your kind words @pbower!

Thanks for that.
To replicate this error, I suggest the following:

Ensure user has no local admin rights, or network rights.
Type /code fast, or hold down backspace. It appears to overload the code completion tool and cause the error.

Alternatively, code for 20-30 minutes and it will appear, crashing the program.
Python 3.7.6 | Qt 5.12.5 | PyQt 5.12.3 | Windows 10
Cheers
Peter

Same here. It was really nice to work with Spyder 2 and 3. ...
Starting with version 4 (or perhaps already somewhere at version 3), with each new version Spyder started to introduce more bugs than features. Imho the focus should for now should be on fixing all the bugs introduced by new (highly optional) features like Kite etc...

Please note that there were a lot of users wanting improved code completion and other new features. The Spyder 4 release was a massive overhaul of the code base. When you do such a large release with a relatively small team, naturally bugs will creep in. The Spyder team has worked very hard over the past couple of months on bug fixing to stabilize the 4.x series. 4.1.2 was tagged yesterday, and is now a PR on conda-forge that passes all CI - so should be available shortly.

Yep, I've taken note of it. I'm not saying that these features should not have been integrated, I'm just saying that a step-by-step integration would have been helpful to avoid introducing large amounts of bugs. F.i. imho either ramping up the internal code completition feature or integrating things like Kite (which for example also doesn't work correctly on my machines). But not both at the same time.

Over the last year in my workplace Spyder "acquired" a set of nicknames, of which "Cryder" (Crashy-Spyder) is one of the most favorable. Spyder went from being the most used Python IDE to a share of about 10%. PyCharm (and some others) have taken over. Unluckily I also had to move to PyCharm yesterday, since no changes seem to happen on this critical issues and otherwise my timeschedule would break my neck...
So imho to discourage people from changing to other IDEs, fixing bugs should be top priority over new features or improving features. And this also includes bug-handling procedures. F.i. the PR on this absolutely critical bug is marked as merged since almost 5 days, but no release has been made. But isn't fixing a critical bug the best reason ever to push an intermediate release, disregarding all planned PRs for the next release cycle?

@JoElfner honestly, I don't think you understand what it takes to do a release of a package like Spyder. Speaking from experience as NumPy and SciPy release manager: it easily takes 1-2 days, and Spyder has a much more complex set of dependencies than NumPy/SciPy. @ccordoba12 and his team are working on this as hard as they can.
Please understand that comments like yours can be very demotivating, and are not really helpful. Community open source projects rely on a small number of maintainers, most of which are working very hard next to a day job or degree. If you want to help, please keep bug reports and comments constructive at a minimum. Contributing fixes or documentation, or donating (https://opencollective.com/spyder - $6500 yearly budget currently) would also be great to consider.

True and sorry for that! I have to admit that I only contributed to and/or released internal/private packages of smaller size than Spyder etc, thus I am short on experience with large packages.
My criticism does not mean that I do not ackowledge the work of the Spyder team. If I wasn't appreciating the work, I wouldn't even care to write a comment here.
In contrast: I really ackowledge the hard and great work and want to thank the team for it. I just thought that some first-hand information/user-experience pointing out some (non-coding-)issues from the user-side might be helpful. Perhaps my words were a bit harsh and/or demotivating, but I personally prefer getting direct feedback over users silently migrating to other tools.

Thanks for your offer @pbower. What we need is a simple, reproducible use case that generates this kind of errors, so we can debug them in our side.

I've only experienced these faults on a Win10 installation with Spyder installed in it's own environment. In MacOS I've not had a problem.
Anecdotally, I'd say the error arises when modifying code quickly. It doesn't necessarily matter how long the code is, or how long the program has been open. Is running Spyder in debug mode likely to prove fruitful?

Hi I have the same problem. It seems that happens randomly.
I have to say that after waiting for version 4.1, that fixed the freezing bug, now we have this. The joy of open source software is here :)
I propose professional users should switch to another environment for the times been.

Hi I have the same problem. It seems that happens randomly.

Both conda-forge and PyPI have 4.1.2 since 2 days; can you please try if this still happens with that version?

Hi I have the same problem. It seems that happens randomly.

Both conda-forge and PyPI have 4.1.2 since 2 days; can you please try if this still happens with that version?

Ok yes I will try today.

Hi,
Please re-open this issue request for 4.1.2
I have been testing today and though the dialog box disappears, once it has occurred once the program constantly freezes for 3-5 seconds until it is shut down and restarted.
Usually, after re-establishing the connection in the background, this continues frequently.
Thanks

Hi I have the same problem. It seems that happens randomly.

Both conda-forge and PyPI have 4.1.2 since 2 days; can you please try if this still happens with that version?

Hi,
Also in addition to comments above, I should add that the temporary fix is still an improvement to the original, as one does not lose their variables / work and there is an opportunity to save/pickle them before restart.
Regards,
Peter

@pbower, please open a new issue about the new problem.

I just upgraded Spyder and so far it seems to be working well. At some point I realised something was going on in the backend as my editor was very slow to react. This took about 5 seconds. It was triggered by moving through commented text in the editor by keyboard arrows, which has previously triggered the endless error popups. So I suspect this was the server restart referred to above. After 5 seconds I was able to continue working normally.
Thank you very much!

Updated Spyder and it's still occurring, usually after an hour or two of work.

@Hagbeard, you can restart the server manually if that occurs. That's all we can do at the moment.

Thanks @ccordoba12, I find killing Spyder to be most effective because the notifications come in such quick succession that even getting a ctrl+s in before the next notification can be hard.

I find killing Spyder to be most effective because the notifications come in such quick succession that even getting a ctrl+s in before the next notification can be hard.

That was in 4.1.1. We're talking about 4.1.2 (please read the last 10 or 15 messages for context).

Roger that, sorry, had previously updated to 4.1.1. It's working better now on 4.1.2, it lags when I think it's going to crash, but doesn't result in the same message and is more stable.

Great to know @Hagbeard!

I have just updated to Spyder 4.1.4 via conda (I also tried conda remove and then reinstalling).  I never saw the popup about code completion and linting before, but now I get it constantly within a minute or two of launching Spyder.  As the error doesn't seem to be fixed for me, anything else I should try?

@shllybkwrm, you probably have installation issues. Please open a new issue about your problem, so we can take a look at them.

Will do.  In the meantime I rolled back to 4.1.3 (following a recommendation earlier in the thread, ) and the popup has gone away as far as I can tell.

Getting the same issue on Spyder installation through Anaconda.
Spyder 4.1.4
Python 3.7.7

"please start Spyder from the Anaconda Prompt or a terminal with the following command
spyder --debug-info verbose --debug-output file
let it run until the dialog appears and upload the file called spyder-debug.log (saved in the directory where you started Spyder)"
From an answer by Spyder Maintainer: https://stackoverflow.com/a/60839390/5114585

"please start Spyder from the Anaconda Prompt or a terminal with the following command
spyder --debug-info verbose --debug-output file
let it run until the dialog appears and upload the file called spyder-debug.log (saved in the directory where you started Spyder)"
From an answer by Spyder Maintainer: https://stackoverflow.com/a/60839390/5114585

I confront this trouble today and find that there is another way to solve it.
Background.
I just install spyder 5.0.5 with my python 3.7 (win10 and through pip install spyder). The spyder works pretty well except that the python language server is down and the auto-completion does not work. I've tried methods like installing parso in the correct version and delete *.pyc files, but they don't work for me.
Solution.
Replace the spyder 5.0.5 with spyder 4.2.5. Perhaps the problem is caused by incompatible issues.
I hope this method can help someone else.

I confront this trouble today and find that there is another way to solve it.
Background.
I just install spyder 5.0.5 with my python 3.7 (win10 and through pip install spyder). The spyder works pretty well except that the python language server is down and the auto-completion does not work. I've tried methods like installing parso in the correct version and delete *.pyc files, but they don't work for me.
Solution.
Replace the spyder 5.0.5 with spyder 4.2.5. Perhaps the problem is caused by incompatible issues.
I hope this method can help someone else.

Thanks @jansonleeljs , this not only fixed my language server issue with spyder 5.0.5 but also the lack of git integration.


Feature/fix templates

pyubx2 Pull Request Template
Description
This PR is fixing markdown issues + hidding tips for creating issue/pr in output which will make it more transparent.
Testing
Please test all changes, however trivial, against the supplied unittest suite tests/test_*.py e.g. by executing the tests/testsuite.py module or using your IDE's native Python unittest integration facilities.
Please describe any test cases you have amended or added to this suite to maintain >= 99% code coverage.

[ ] Test A
[ ] Test B

Checklist:

[X] My code follows the style guidelines of this project (see CONTRIBUTING.MD).
[X] I have performed a self-review of my own code.
[ ] (if appropriate) I have cited my u-blox documentation source(s).
[ ] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[ ] (if appropriate) I have added test cases to the tests/test_*.py unittest suite to maintain >= 99% code coverage.
[ ] I have tested my code against the full tests/test_*.py unittest suite.
[X] My changes generate no new warnings.
[ ] Any dependent changes have been merged and published in downstream modules.
[ ] I understand and acknowledge that the code will be published under a BSD 3-Clause license.

Hi @Hadatko I'm sorry, but it's not clear to me what the purpose or objectives of this change are? I'm not aware of any significant issues with the PR template. Can you expand on the motivation and what problem you feel is being addressed here?

When user is creating pr/issue you are providing aditional text which is informing user about details. These information are not more needed after PR is created as all information were filled and pushed. So changing them to markdown comments you will have cleaner PR/ISSUE detail, but still available for user in time of creation.

Appreciate the contribution but I'm not convinced this is a worthwhile change. The PR template is not excessively verbose and retaining the full transcript after the merge is not particularly problematic.

No problem with your decision but you should consider use of first commit as it is fixing several markdown issues.

Hi @Hadatko FYI I've incorporated some minor template updates in a recent tidy-up push.


Set-DbaTempDbConfig - Fix the resize of the log file by default

Function Set-DbaTempDbConfig sets the tempdb log file size as 25%
of total data files, even though the parameter LogFileSize is not
specified. With this change the size of the log file is only changed
when that parameter is specified. In any case, in the output of the
command, the final log file size (modified or not) is displayed
correctly

Type of Change

[x] Bug fix (non-breaking change, fixes #6202  )
[ ] New feature (non-breaking change, adds functionality, fixes # )
[ ] Breaking change (effects multiple commands or functionality, fixes # )
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
[ ] Nunit test is included
[ ] Documentation
[ ] Build system

Purpose

Prevent the command Set-DbaTempDbConfig from resizing the transaction log file of the tempdb if it is not specified.
Approach
One change to  Set-DbaTempDbConfig
Change - Only when the  LogFileSize parameter is specified the size of the tempdb log file is modified. The 25% rule to determine the log size has been removed in the code and in the command and parameter description.
Commands to test
Set-DbaTempDbConfig

I added a new commit. I don´t know if I have to add a comment to request a second review of the code after the update or if the commit itself is enough.

We get notifications when commits are added to PRs, no worries.
The test for this command is not actually test the changes you've made, it has no integration test. So this PR will sit for a bit until I can get around to testing the changes....I'll try to update the Pester test for it as well.

Sweet, this is a lot of work, thank you so much 💯

All checks passed 🥳  Shawn if you would still like to make the changes, please submit a new PR


Compilation error

I wanted to test nextjs-styled.
Simply did npm i and npm run dev and got an error.
SyntaxError: Unexpected token '??='
    at wrapSafe (internal/modules/cjs/loader.js:1001:16)
    at Module._compile (internal/modules/cjs/loader.js:1049:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at Module.mod.require (/Users/x/Documents/github/primereact-examples/nextjs-styled-tailwind/node_modules/next/dist/server/require-hook.js:64:28)
    at require (internal/modules/cjs/helpers.js:93:18)
    at Object.<anonymous> (/Users/x/Documents/github/primereact-examples/nextjs-styled-tailwind/node_modules/next/dist/telemetry/post-payload.js:17:19)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:40089) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:40089) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Process finished with exit code 0

Any idea?

Got the wrong version of node.
Migrated to 18 and it's fine.


[CI] Tests fails with PySide/python2.7 on Windows

On appveyor with PySide, tests fail and end with:
testSetAnotherPlot (silx.gui.plot.test.testStats.TestStatsWidgetWithCurves) ...
Command exited with code -1073741819

No clear reason why... no dependencies has changed between last version that passed the tests and current master...
Is it still worth investigating PySide (not PySide2) issues?

Issue introduced with PR #2085 even though issue arise in testStats.
It seg fault in TestCaseQt._checkForUnreleasedWidgets while calling gc.collect...
A way to workaround this is to show the PlotWidget in TestStatsWidgetWithCurves.setUp...
but as it is a PySide(1) only issue, I'm a bit reluctant to make workaround for it....


[Bug]: frame_size_reduction does not allow value of 0

Description
Docs say that frame_size_reduction on WebGear_RTC must be 0-90. If frame_size_reduction is set to 0 using a custom_stream, application will not stream video. No errors are raised in python or in the web console. See sample code below to reproduce (generates random frames with a timestamp).
Issue Checklist

[X] I have searched open or closed issues for my problem and found nothing related or helpful.
[X] I have read the Documentation and found nothing related to my problem.
[X] I've read the Issue Guidelines and wholeheartedly agree.

Expected behaviour
Setting frame_size_reduction to 0 should stream uncompressed frames
Actual behaviour
Application does not stream video. Nothing is logged, so I'm not sure what the error is.
Steps to reproduce

Run python code below. Frames are generated programmatically.

Terminal log output
18:32:53 ::  WebGear_RTC  :: CRITICAL :: Enabled live broadcasting for Peer connection(s).
18:32:53 :: Helper_Async  ::  DEBUG   :: Found valid WebGear data-files successfully.
18:32:53 ::  WebGear_RTC  ::  DEBUG   :: `/home/crafco-admin/.vidgear/webgear_rtc` is the default location for saving WebGear_RTC data-files.
18:32:53 ::    Helper     ::   INFO   :: Running VidGear Version: 0.3.0
18:32:53 ::  WebGear_RTC  :: CRITICAL :: Using custom stream for its Default Internal Video-Server.
18:32:53 ::  WebGear_RTC  ::  DEBUG   :: Setting params:: Size Reduction:0% and emulating infinite frames
18:32:53 ::  WebGear_RTC  ::  DEBUG   :: Running Starlette application.
INFO:     Started server process [115814]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://<IP_ADDRESS>:8000 (Press CTRL+C to quit)
INFO:     <IP_ADDRESS>:53713 - "POST /close_connection HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:53713 - "GET / HTTP/1.1" 200 OK
18:32:55 ::  WebGear_RTC  ::  DEBUG   :: Initiating Video Streaming.
18:32:55 ::  WebGear_RTC  ::  DEBUG   :: Launching Internal RTC Video-Server
18:32:55 ::  WebGear_RTC  ::   INFO   :: Created WebRTC Peer Connection.
INFO:     <IP_ADDRESS>:53713 - "POST /offer HTTP/1.1" 200 OK
18:32:56 ::  WebGear_RTC  ::  DEBUG   :: ICE connection state is checking
18:32:56 ::  WebGear_RTC  ::  DEBUG   :: ICE connection state is completed
18:32:56 ::  WebGear_RTC  ::  DEBUG   :: Setting timestamps
18:32:57 :: Helper_Async  ::  DEBUG   :: Adding text: No Input

Python Code(Optional)
import time
import datetime
import cv2
import numpy as np

from vidgear.gears.asyncio import WebGear_RTC
import uvicorn

def time_frame(size=(480, 640, 1)):
    frame = np.random.randint(0, 255, size=size, dtype=np.uint8)
    # get current time
    now = datetime.datetime.now()
    current_time = now.strftime("%H:%M:%S.%f")

    # put current time text in the image
    font = cv2.FONT_HERSHEY_SIMPLEX
    cv2.putText(frame, current_time, (200, 240), font, 1, 255, 2, cv2.LINE_AA)
    return frame

frame_rate = 30

class Custom_Stream_Class:
    def __init__(self) -> None:
        self.start_time = None

    def read(self):
        if self.start_time is None:
            self.start_time = time.time()
        elapsed_time = time.time()
        # if (elapsed_time - self.start_time) > (1/frame_rate):
        self.start_time += 1/frame_rate
        if (elapsed_time - self.start_time) > 5/frame_rate:
            print(elapsed_time - self.start_time)
        return time_frame((1080, 1920, 1))

    def stop(self):
        return

opts = {
    "custom_stream": Custom_Stream_Class(),
    "framerate": frame_rate, #removing this does not help
    "enable_live_broadcast": True, # removing this does not help
    "enable_infinite_frames": True, # removing this does not help
    'time_delay': 1, # removing this does not help
    'frame_size_reduction': 0 #setting to 1 or greater works
}
webgear_rtc = WebGear_RTC(logging=True, **opts)
# # run this app on Uvicorn server at address http://localhost:8000/
uvicorn.run(webgear_rtc(), host='<IP_ADDRESS>', port=8000)

# # close app safely
webgear_rtc.shutdown()

VidGear Version
0.3.0
Python version
3.10.6
OpenCV version
4.7.0
Operating System version
Ubuntu 22.04.2 LTS
Any other Relevant Information?
No response

@jarodhanko-crafco Okay there was a bug in PyAV backend library that got exposed because of your code.

Why it worked with  frame_size_reduction parameter defined(or greater than 0)?
If defined, vidgear it uses OpenCV functions to manipulate frame size and yield (height, width) shaped frames supported by PyAV's VideoFrame.from_ndarray.
Solution
The possible solution is to just drop third dimension if detected. And I'm going to implement that only. For now, you code will work if shape is (1080, 1920) and not (1080, 1920, 1).

@jarodhanko-crafco This issue has been resolved in commit https://github.com/abhiTronix/vidgear/commit/41c9e996001bdaf47e3d47f22ed212e28dedb003.