What steps will reproduce the problem?
%load_ext autoreload, %autoreload 2
What is the expected output? What do you see instead?
Please provide any additional information below
File "C:\Anaconda3\lib\site-packages\spyder\plugins\configdialog.py", line 221, in button_clicked
configpage.apply_changes()
File "C:\Anaconda3\lib\site-packages\spyder\plugins\configdialog.py", line 100, in apply_changes
self.save_to_conf()
File "C:\Anaconda3\lib\site-packages\spyder\plugins\configdialog.py", line 408, in save_to_conf
self.set_option(option, to_text_string(lineedit.text()))
File "C:\Anaconda3\lib\site-packages\spyder\plugins__init__.py", line 437, in set_option
CONF.set(self.CONF_SECTION, str(option), value)
File "C:\Anaconda3\lib\site-packages\spyder\config\user.py", line 443, in set
self._set(section, option, value, verbose)
File "C:\Anaconda3\lib\site-packages\spyder\config\user.py", line 86, in _set
cp.ConfigParser.set(self, section, option, value)
File "C:\Anaconda3\lib\configparser.py", line 1193, in set
super().set(section, option, value)
File "C:\Anaconda3\lib\configparser.py", line 894, in set
value)
File "C:\Anaconda3\lib\configparser.py", line 402, in before_set
"position %d" % (value, tmp_value.find('%')))
ValueError: invalid interpolation syntax in '%load_ext autoreload, %a
Work Around
from IPython import get_ipython, ipython = get_ipython(), ipython.magic("load_ext autoreload"), ipython.magic("autoreload 2")
@dalthviz, please take a look at this one. We have to find a way to prevent saving strings with %
in our config system (i.e. in spyder.ini
).
I had to add some special code around spyder/plugins/variableexplorer.py:110 to remove the %
at the start of a format string, so that code can probably be streamlined after this is fixed.
Thanks @jitseniesen!