spyder: Spyder Internal Problem (Blowfish deprecated ?)

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

I have been trying to integrate PsychoPy with Spyder, and have been following online instructions to create environments viathe Anaconda prompt through which these two programs can interact. Examples of the code I’ve been using to do this are:

conda env create -n psychopy -f psychopy-env.yml conda activate psychopy

OR:

conda create -n psychopy python=3.8 anaconda source activate psychopy pip install psychopy

OR:

conda create -n psychopyenv python=3.8 conda install -n psychopyenv pip spyder psychopy conda activate psychopyenv

After all this, Spyder still does not recognise the PsychoPy module. And now, when I open Spyder, an ‘Issue reporter’ window opens saying that there is an internal problem. Spyder also seems to have ‘reset’, in that all my altered keyboard shortcuts have returned to default settings and I keep being offered the interactive software tour upon startup, as if I’ve just downloaded Spyder for the first time.

What steps reproduce the problem?

  1. Opening Spyder.

What is the expected output? What do you see instead?

When opening Spyder from the Anaconda prompt, there are the following lines of errors:

(base) C:\Users\alexn>spyder fromIccProfile: failed minimal tag size sanity C:\Users\alexn\anaconda3\lib\site-packages\paramiko\transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated “class”: algorithms.Blowfish, Error on reading from the event loop self pipe loop: <ProactorEventLoop running=True closed=False debug=False> Traceback (most recent call last): File “C:\Users\alexn\anaconda3\lib\asyncio\windows_events.py”, line 453, in finish_recv return ov.getresult() OSError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “C:\Users\alexn\anaconda3\lib\asyncio\proactor_events.py”, line 768, in _loop_self_reading f.result() # may raise File “C:\Users\alexn\anaconda3\lib\asyncio\windows_events.py”, line 808, in _poll value = callback(transferred, key, ov) File “C:\Users\alexn\anaconda3\lib\asyncio\windows_events.py”, line 457, in finish_recv raise ConnectionResetError(*exc.args) ConnectionResetError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request

Paste Traceback/Error Below (if applicable)


PASTE TRACEBACK HERE

Versions

  • Spyder version: 5.3.3
  • Python version: 3.8.5
  • Qt version:
  • PyQt version:
  • Operating System name/version: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.31.1;<8.0.0       :  7.31.1 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  4.16.0 (OK)
keyring >=17.0.0              :  23.4.0 (OK)
nbconvert >=4.0               :  6.4.4 (OK)
numpydoc >=0.6.0              :  1.4.0 (OK)
paramiko >=2.4.0              :  2.8.1 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.9.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=2.5.0;<3.0           :  2.14.5 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.5.0;<1.6.0          :  1.5.0 (OK)
pylsp_black >=1.2.0           :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0     :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=1.0.2             :  1.0.3 (OK)
qtconsole >=5.3.2;<5.4.0      :  5.3.2 (OK)
qtpy >=2.1.0                  :  2.2.0 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  65.5.0 (OK)
sphinx >=0.6.6                :  5.0.2 (OK)
spyder_kernels >=2.3.3;<2.4.0 :  2.3.3 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
zmq >=22.1.0                  :  23.2.0 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=3.0.0            :  3.5.1 (OK)
numpy >=1.7                   :  1.23.3 (OK)
pandas >=1.1.1                :  1.4.1 (OK)
scipy >=0.17.0                :  1.7.3 (OK)
sympy >=0.7.3                 :  None (NOK)

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 40 (13 by maintainers)

Most upvoted comments

These are separate anomalies, hence, you have 2 issues.

The vanilla default conda channel is using an old paramiko. See https://anaconda.org/anaconda/paramiko

The conda-forge channel has the correct version of paramiko to use. See https://anaconda.org/conda-forge/paramiko . Don’t ask me why the default channel has fallen so far behind! Well, everybody is busy.

To get the conda-forge package instance of paramiko, do this: conda install -c conda-forge paramiko.

Using the Spyder (excellent) debugger, I can see this:

def check_python_help(filename):
    """Check that the python interpreter can compile and provide the zen."""
    try:
        proc = run_program(filename, ['-c', 'import this'], env={})
        stdout, _ = proc.communicate()
        stdout = str(stdout)
        valid_lines = [
            'Beautiful is better than ugly.',
            'Explicit is better than implicit.',
            'Simple is better than complex.',
            'Complex is better than complicated.',
        ]
        if all(line in stdout for line in valid_lines):
            return True
        else:
            return False
    except Exception:
        return False

Suggest you do the same. Step into the following function:

def run_program(program, args=None, **subprocess_kwargs):
    """
    Run program in a separate process.

    NOTE: returns the process object created by
    `subprocess.Popen()`. This can be used with
    `proc.communicate()` for example.

    If 'shell' appears in the kwargs, it must be False,
    otherwise ProgramError will be raised.

    If only the program name is given and not the full path,
    a lookup will be performed to find the program. If the
    lookup fails, ProgramError will be raised.

    Note that stdin, stdout and stderr will be set by default
    to PIPE unless specified in subprocess_kwargs.

    :str program: The name of the program to run.
    :list args: The program arguments.
    :subprocess_kwargs: These will be passed to subprocess.Popen.
    """
    if 'shell' in subprocess_kwargs and subprocess_kwargs['shell']:
        raise ProgramError("This function is only for non-shell programs, "
                           "use run_shell_command() instead.")
    fullcmd = find_program(program)
    if not fullcmd:
        raise ProgramError("Program %s was not found" % program)
    # As per subprocess, we make a complete list of prog+args
    fullcmd = get_full_command_for_program(fullcmd) + (args or [])
    for stream in ['stdin', 'stdout', 'stderr']:
        subprocess_kwargs.setdefault(stream, subprocess.PIPE)
    subprocess_kwargs = alter_subprocess_kwargs_by_platform(
        **subprocess_kwargs)
    return subprocess.Popen(fullcmd, **subprocess_kwargs)

Set a breakpoint at return subprocess.Popen(fullcmd, **subprocess_kwargs). What values are fullcmd and subprocess_kwargs set to?

@Nagle2036 In addition to the remedy suggested by @ccordoba12

paramiko\transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated

Yes, blowfish is deprecated in favour of AES. I believe that you are seeing this issue originating from paramikobecause the installed version (2.8.1 - 2021-11-28) is out of date. I would try specifically updating paramiko. The resulting version should be bumped significantly.

Reference: https://www.paramiko.org/changelog.html?highlight=blowfish#2.11.0