Skip to content

Import fails in (some) spyder versions #19

@mwcraig

Description

@mwcraig

From the vpython email list (https://groups.google.com/forum/?hl=en#!topic/vpython-users/jFiOpafJnkI):

 from vpython import*
  box()

there is an error showed in console:

  KeyError: 'default/interpreter/dedicated'

but it is fine when I use Jupyter Notebook to run it.

How can I fix this?

The console message:

runfile('D:/user/Desktop/WPy64-3740/settings/.spyder-py3/temp.py', wdir='D:/user/Desktop/WPy64-3740/settings/.spyder-py3')
Traceback (most recent call last):

  File "<ipython-input-1-e68d4507caad>", line 1, in <module>
    runfile('D:/user/Desktop/WPy64-3740/settings/.spyder-py3/temp.py', wdir='D:/user/Desktop/WPy64-3740/settings/.spyder-py3')

  File "D:\user\Desktop\WPy64-3740\python-3.7.4.amd64\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
    execfile(filename, namespace)

  File "D:\user\Desktop\WPy64-3740\python-3.7.4.amd64\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "D:/user/Desktop/WPy64-3740/settings/.spyder-py3/temp.py", line 8, in <module>
    from vpython import*

  File "D:\user\Desktop\WPy64-3740\python-3.7.4.amd64\lib\site-packages\vpython\__init__.py", line 57, in <module>
    _warn_if_spyder_settings_wrong()

  File "D:\user\Desktop\WPy64-3740\python-3.7.4.amd64\lib\site-packages\vpython\_notebook_helpers.py", line 15, in _warn_if_spyder_settings_wrong
    if not _spyder_run_setting_is_correct():

  File "D:\user\Desktop\WPy64-3740\python-3.7.4.amd64\lib\site-packages\vpython\_notebook_helpers.py", line 11, in _spyder_run_setting_is_correct
    return CONF['run']['default/interpreter/dedicated']

  File "D:\user\Desktop\WPy64-3740\python-3.7.4.amd64\lib\configparser.py", line 1251, in __getitem__
    raise KeyError(key)

KeyError: 'default/interpreter/dedicated'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingspyder

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions