Xqt added a comment.

changing the two lines to

  options += [ListAlternativesOption('list', 'l', self),
              AddAlternativeOption('add new', 'a', self)]

does solve that Problem given above but the Options couldn't used by 
input_choice:

  Traceback (most recent call last):
    File "C:\pwb\GIT\core\pwb.py", line 226, in <module>
      if not main():
    File "C:\pwb\GIT\core\pwb.py", line 220, in main
      run_python_file(filename, [filename] + args, argvu, file_package)
    File "C:\pwb\GIT\core\pwb.py", line 87, in run_python_file
      main_mod.__dict__)
    File ".\scripts\misspelling.py", line 166, in <module>
      main()
    File ".\scripts\misspelling.py", line 162, in main
      bot.run()
    File "C:\pwb\GIT\core\scripts\solve_disambiguation.py", line 1059, in run
      self.treat(refPage, disambPage)
    File "C:\pwb\GIT\core\scripts\solve_disambiguation.py", line 767, in treat
      default=self.always)
    File "C:\pwb\GIT\core\pywikibot\bot.py", line 626, in input_choice
      automatic_quit=automatic_quit, force=force)
    File "C:\pwb\GIT\core\pywikibot\userinterfaces\terminal_interface_base.py", 
li
  ne 315, in input_choice
      u'option and shortcut.'.format(i))
  ValueError: Option #3 does not consist of an option and shortcut.

Investigation into this shows the following for option variable:

  [<pywikibot.bot_choice.ListOption object at 0x03E2F390>, 
<pywikibot.bot_choice.L
  istOption object at 0x03E2FAB0>, <pywikibot.bot_choice.StandardOption object 
at
  0x03E2F790>, (<scripts.solve_disambiguation.EditOption object at 
0x03E2F130>,),
  <pywikibot.bot_choice.StandardOption object at 0x03E2F290>, 
<pywikibot.bot_choic
  e.StandardOption object at 0x03E2FBB0>, 
<pywikibot.bot_choice.HighlightContextOp
  tion object at 0x03E2F9D0>, <scripts.solve_disambiguation.ShowPageOption 
object
  at 0x03E2F9B0>, <scripts.solve_disambiguation.ListAlternativesOption object 
at 0
  x03E2F310>, <scripts.solve_disambiguation.AddAlternativeOption object at 
0x03E2F
  670>]


TASK DETAIL
  https://phabricator.wikimedia.org/T104952

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: jayvdb, XZise, Aklapper, Xqt, pywikibot-bugs-list, Malyacko, P.Copp



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to