Jupyter-themes: ValueError: unsupported format character ')' (0x29) at index 22

Created on 19 Sep 2017  路  2Comments  路  Source: dunovank/jupyter-themes

Hello,

I've been building a version of jupyterthemes for conda-forge (See this pull) but our CIs have been failing with an error related to argparse. I'm also seeing the same error when I pip install into my local environment and then call jt --help:

$ pip install jupyterthemes
Collecting jupyterthemes
  Using cached jupyterthemes-0.17.8-py2.py3-none-any.whl
Requirement already satisfied: ipython>=5.4.1 in /opt/anaconda2/lib/python2.7/site-packages (from jupyterthemes)
Requirement already satisfied: lesscpy>=0.12.0 in /opt/anaconda2/lib/python2.7/site-packages (from jupyterthemes)
Requirement already satisfied: matplotlib>=1.4.3 in /opt/anaconda2/lib/python2.7/site-packages (from jupyterthemes)
Requirement already satisfied: jupyter-core in /opt/anaconda2/lib/python2.7/site-packages (from jupyterthemes)
Requirement already satisfied: setuptools>=18.5 in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: backports.shutil-get-terminal-size; python_version == "2.7" in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: pickleshare in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: simplegeneric>0.8 in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: decorator in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: pexpect; sys_platform != "win32" in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: pathlib2; python_version == "2.7" or python_version == "3.3" in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: pygments in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: traitlets>=4.2 in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: appnope; sys_platform == "darwin" in /opt/anaconda2/lib/python2.7/site-packages (from ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: ply in /opt/anaconda2/lib/python2.7/site-packages (from lesscpy>=0.12.0->jupyterthemes)
Requirement already satisfied: six in /opt/anaconda2/lib/python2.7/site-packages (from lesscpy>=0.12.0->jupyterthemes)
Requirement already satisfied: numpy>=1.7.1 in /opt/anaconda2/lib/python2.7/site-packages (from matplotlib>=1.4.3->jupyterthemes)
Requirement already satisfied: python-dateutil in /opt/anaconda2/lib/python2.7/site-packages (from matplotlib>=1.4.3->jupyterthemes)
Requirement already satisfied: functools32 in /opt/anaconda2/lib/python2.7/site-packages (from matplotlib>=1.4.3->jupyterthemes)
Requirement already satisfied: subprocess32 in /opt/anaconda2/lib/python2.7/site-packages (from matplotlib>=1.4.3->jupyterthemes)
Requirement already satisfied: pytz in /opt/anaconda2/lib/python2.7/site-packages (from matplotlib>=1.4.3->jupyterthemes)
Requirement already satisfied: cycler>=0.10 in /opt/anaconda2/lib/python2.7/site-packages (from matplotlib>=1.4.3->jupyterthemes)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /opt/anaconda2/lib/python2.7/site-packages (from matplotlib>=1.4.3->jupyterthemes)
Requirement already satisfied: wcwidth in /opt/anaconda2/lib/python2.7/site-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython>=5.4.1->jupyterthemes)
Requirement already satisfied: scandir in /opt/anaconda2/lib/python2.7/site-packages (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython>=5.4.1->jupyterthemes)
Installing collected packages: jupyterthemes
Successfully installed jupyterthemes-0.17.8
$ jt --help
Traceback (most recent call last):
  File "/opt/anaconda2/bin/jt", line 11, in <module>
    sys.exit(main())
  File "/opt/anaconda2/lib/python2.7/site-packages/jupyterthemes/__init__.py", line 263, in main
    args = parser.parse_args()
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 1701, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 1733, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 1939, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 1879, in consume_optional
    take_action(action, args, option_string)
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 1807, in take_action
    action(self, namespace, argument_values, option_string)
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 996, in __call__
    parser.print_help()
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 2340, in print_help
    self._print_message(self.format_help(), file)
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 2314, in format_help
    return formatter.format_help()
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 281, in format_help
    help = self._root_section.format_help()
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 211, in format_help
    func(*args)
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 211, in format_help
    func(*args)
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 517, in _format_action
    help_text = self._expand_help(action)
  File "/opt/anaconda2/lib/python2.7/argparse.py", line 603, in _expand_help
    return self._get_help_string(action) % params
ValueError: unsupported format character ')' (0x29) at index 22

Any idea what's up here? is this just tied to the command line call?

Most helpful comment

edit python2.7/site-packages/jupyterthemes/__init__.py at line 178:

 help='mathjax fontsize (in %)')

to

 help='mathjax fontsize (in %%)')  #maybe

there is a character % is not escaped
I just submit a Post Request :)

All 2 comments

edit python2.7/site-packages/jupyterthemes/__init__.py at line 178:

 help='mathjax fontsize (in %)')

to

 help='mathjax fontsize (in %%)')  #maybe

there is a character % is not escaped
I just submit a Post Request :)

I'll accept that now. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lucainnocenti picture lucainnocenti  路  6Comments

baibai25 picture baibai25  路  8Comments

Peydon picture Peydon  路  3Comments

rouseguy picture rouseguy  路  4Comments

AFederici picture AFederici  路  7Comments