spyder: "TypeError: not enough arguments for format string" when starting Spyder in Portuguese
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(orpip, 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
What steps reproduce the problem?
- Update spyder to 4.11
What is the expected output? What do you see instead?
Spyder crashes before launch
Paste Traceback/Error Below (if applicable)
Traceback (most recent call last):
File "/home/cristiana/anaconda3/envs/fintools/bin/spyder", line 11, in <module>
sys.exit(main())
File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/start.py", line 205, in main
mainwindow.main()
File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 3700, in main
mainwindow = run_spyder(app, options, args)
File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 3556, in run_spyder
main.setup()
File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 1217, in setup
self.apply_shortcuts()
File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 3207, in apply_shortcuts
self.help.show_intro_message()
File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/plugins/help/plugin.py", line 455, in show_intro_message
intro_message = (intro_message_eq + intro_message_common) % (
TypeError: not enough arguments for format string
Versions
- Spyder version: 4.1.1-py38_1
- Python version: 3.8
- Qt version:
- PyQt version:
- Operating System name/version:
Dependencies
After reading some other issues, I found out that
spyder --reset
has solved the problem. But I am reporting the error anyway.
Thanks
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 15 (8 by maintainers)
In addition, as experience, I have tried the file pt_BR spyder.mo from earlier release 3.3.6 (from zip source) in 4.1.1 Win64 10 release. This time spyder 4.1.1 started up without any crash with file spyder.mo from spyder 3.3.6 release. I made only a test, it is not a solution.
PS: I speak brazilian portuguese too.
@cpkc, that’s great!! I can understand the source of the problem now: it seems the Portuguese translator copied the translated string from
spyder/plugins/help/plugin.py:414tospyder/plugins/help/plugin.py:410, without noticing that the one in line 414 has an extra%s.I did the fix myself here:
https://github.com/spyder-ide/spyder/blob/8a2cdde1795bbd87664489f1954ed2748729b3dc/spyder/locale/pt_BR/LC_MESSAGES/spyder.po#L3396-L3398
and it’ll be part of our next version (4.1.3), to be released at the end of the month.
Thanks a lot @Cristianasp for reporting and @cpkc for finding the cause!!
Interesting… My spyder language is English but it happens that I speak brazilian portuguese so it should be somewhere in the code of some configuration files!
I find issue here: %HOME%\Anaconda3\Lib\site-packages\spyder\locale\pt_BR\LC_MESSAGES file spyder.mo won’t let spyder start in Brazilian Portuguese! At least in Windows 10 64.
Forgot to mention that I got this error on Ubuntu.
Em qui, 26 de mar de 2020 00:37, Daniel Althviz Moré < notifications@github.com> escreveu: