question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when starting kernel: "The following argument was not expected: /path/to/environment/"

See original GitHub issue

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) – could not reproduce in IPython: running jupyter qtconsole gave an error (see below)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of AnacondaDid reinstall, but using Miniconda, not Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Error from jupyter qtconsole:

(spyder-env) C:\WINDOWS\system32>jupyter qtconsole
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [--debug] [subcommand]

Jupyter: Interactive Computing

positional arguments:
  subcommand     the subcommand to launch

optional arguments:
  -h, --help     show this help message and exit
  --version      show the versions of core jupyter packages and exit
  --config-dir   show Jupyter config dir
  --data-dir     show Jupyter data dir
  --runtime-dir  show Jupyter runtime dir
  --paths        show all Jupyter paths. Add --json for machine-readable format.
  --json         output paths as machine-readable json
  --debug        output debug information about paths

Available subcommands: kernel kernelspec migrate run script troubleshoot

Jupyter command `jupyter-qtconsole` not found.

(spyder-env) C:\WINDOWS\system32>

Problem Description

What steps reproduce the problem?

  1. Install new version of Spyder (5.3.3)
  2. Agree to uninstall previous version
  3. Start Spyder

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

Expected: Start Spyder with an active prompt in the IPython console

Instead:

  • “An error ocurred while starting the kernel”
  • “The following argument was not expected: C:/ProgramData/Miniconda3/envs/spyder‑env”
  • Followed by other errors

Paste Traceback/Error Below (if applicable)


The following argument was not expected: C:/ProgramData/Miniconda3/envs/spyder-env
Run with --help for more information.

Versions

  • Spyder version: 5.3.3
  • Python version: 3.9.13
  • Qt version: Unknown
  • PyQt version: Unknown
  • Operating System name/version: Windows 11 Enterprise version 21H2

Dependencies

# Mandatory:
atomicwrites >=1.2.0                 :  1.4.1 (OK)
chardet >=2.0.0                      :  5.0.0 (OK)
cloudpickle >=0.5.0                  :  2.1.0 (OK)
cookiecutter >=1.6.0                 :  2.1.1 (OK)
diff_match_patch >=20181111          :  20200713 (OK)
intervaltree                         :  None (OK)
IPython >=7.31.1;<8.0.0              :  7.34.0 (OK)
jedi >=0.17.2;<0.19.0                :  0.18.1 (OK)
jellyfish >=0.7                      :  0.9.0 (OK)
jsonschema >=3.2.0                   :  4.14.0 (OK)
keyring >=17.0.0                     :  23.8.2 (OK)
nbconvert >=4.0                      :  7.0.0 (OK)
numpydoc >=0.6.0                     :  1.4.0 (OK)
paramiko >=2.4.0                     :  2.11.0 (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.1 (OK)
pygments >=2.0                       :  2.13.0 (OK)
pylint >=2.5.0;<3.0                  :  2.15.0 (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.3 (OK)
qstylizer >=0.1.10                   :  0.2.1 (OK)
qtawesome >=1.0.2                    :  1.1.1 (OK)
qtconsole >=5.3.2;<5.4.0             :  5.3.2 (OK)
qtpy >=2.1.0                         :  2.2.0 (OK)
rtree >=0.9.7                        :  1.0.0 (OK)
setuptools >=49.6.0                  :  65.3.0 (OK)
sphinx >=0.6.6                       :  5.1.1 (OK)
spyder_kernels >=2.3.3;<2.4.0        :  2.3.3 (OK)
textdistance >=4.2.0                 :  4.4.0 (OK)
three_merge >=0.1.1                  :  0.1.1 (OK)
watchdog                             :  2.1.9 (OK)
zmq >=22.1.0                         :  23.2.1 (OK)

# Optional:
cython >=0.21                        :  0.29.32 (OK)
matplotlib >=3.0.0                   :  3.5.3 (OK)
numpy >=1.7                          :  1.22.4 (OK)
pandas >=1.1.1                       :  1.4.3 (OK)
scipy >=0.17.0                       :  1.9.1 (OK)
sympy >=0.7.3                        :  1.11 (OK)

# Spyder plugins:
spyder_terminal.terminalplugin 1.2.2 :  1.2.2 (OK)


Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
woudreuscommented, Sep 23, 2022

This error also appears when launching Spyder after a “install for just me” installation (although path has been modified).

Also, in Spyder, running a new kernel usually allows me to use the console. However, the warning still persists afterwards.

First initialization: image

After starting new kernel: image

Hopefully this provides a clue to the issue.

1reaction
dalthvizcommented, Sep 13, 2022

Actually re-reading #16562 seems like the original issue there is different to the error The following argument was not expected: /path/to/environment/. I think the issues are related but not completly the same. So actually maybe is worthy to keep both 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to restart kernel in spyder after changing the enviroment
The following argument was not expected: C:/Users/MyName/Miniconda3/envs/spyder-env Run with --help for more information. Traceback (most recent ...
Read more >
Common Illnesses — Spyder 5 documentation
If you receive the message An error occurred while starting the kernel in the IPython Console, Spyder was unable to launch a new...
Read more >
Class "Solarium\Client" not found error [#2702031] | Drupal.org
The following error is thrown when trying to add a server, edit a server, or visit a search results page. Fatal error: Class...
Read more >
kernel kernelspec migrate run troubleshoot jupyter command ...
Expected : Start Spyder with an active prompt in the IPython console. Instead: "An error ocurred while starting the kernel"; "The following argument...
Read more >
Lmod Documentation - Read the Docs
It is possible to try to load a module with no error message if it ... Due to MODULEPATH changes the follow modules...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found