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.

"TypeError: not enough arguments for format string" when starting Spyder in Portuguese

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)
  • 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?

  1. 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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
cpkccommented, Apr 5, 2020

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.

1reaction
ccordoba12commented, Apr 5, 2020

@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:414 to spyder/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!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python TypeError: not enough arguments for format string
You need to put the format arguments into a tuple (add parentheses): instr = "'%s', '%s', '%d', '%s', '%s', '%s', '%s'" % (softname, ......
Read more >
Python TypeError: not enough arguments for format string
The “TypeError: not enough arguments for format string” error is raised when the number of arguments specified in a string format operation is...
Read more >
TypeError: not enough arguments for format string - Yawin Tutor
The TypeError: not enough arguments for format string error occurs if the number of arguments specified in the string format operation is not...
Read more >
Bug listing with status RESOLVED with resolution TEST ...
Bug:233 - "Emacs segfaults when merged through the sandbox." status:RESOLVED resolution:TEST-REQUEST severity:critical · Bug:3888 - "yenta_socket module not ...
Read more >
Fiona - PyPI
Load GDAL DLL dependencies on Python 3.8+ / Windows with add_dll_directory() (#851). Do not require optional properties (#848). Ensure that slice does not...
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