Page MenuHomePhabricator

UserWarning: Configuration variable table2wikiSkipWarnings is defined but unknown. Misspelled? on redirect.py
Closed, ResolvedPublic

Description

Running redirect.py I'm receiving this error message. The script does not break, but it's worth having a look.

/data/project/shared/pywikipedia/core/pywikibot/config2.py:1064: UserWarning: Configuration variable table2wikiSkipWarnings is defined but unknown. Misspelled?
  'Misspelled?'.format(name), UserWarning)
/data/project/shared/pywikipedia/core/pywikibot/config2.py:1064: UserWarning: Configuration variable table2wikiAskOnlyWarnings is defined but unknown. Misspelled?
  'Misspelled?'.format(name), UserWarning)
WARNING: Defined site without changing it.

First appearance in my bot logs dates back to 22 May 2017.

Event Timeline

As the route indicates, it's a problem with the script located in the shared pywikibot files of Tool Labs, or at least it seems to me that. Thanks.

This variable is defined in user_config.py but was removed from config2.py. The solution is to remove it from user_config.py too.

I think you still have table2wikiSkipWarnings and table2wikiAskOnlyWarnings in your user-config.py.
Being removed from config2.py some time ago, the inconsistency is highlighted.

Can you check?

If this is the case, the message is a bit misleading.

I think you still have table2wikiSkipWarnings and table2wikiAskOnlyWarnings in your user-config.py.
Being removed from config2.py some time ago, the inconsistency is highlighted.

Can you check?

If this is the case, the message is a bit misleading.

didn't see Xqt already replied ...

MarcoAurelio triaged this task as Low priority.

I've removed:

# table2wiki.py works quite stable, so you might switch to True
table2wikiAskOnlyWarnings = True
table2wikiSkipWarnings = False

from user-config.py and I'm no longer receiving the error nor the script crashes. Thanks!

I also had this error message.
Perhaps we should edit this to add a link to a search page on Phabricator ? This is how I found this ticket.

Change 440909 had a related patch set uploaded (by Framawiki; owner: Framawiki):
[pywikibot/core@master] [IMPR] config2: clarify UserWarning error messages

https://gerrit.wikimedia.org/r/440909

Framawiki claimed this task.

Change 440909 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] config2: clarify UserWarning error messages

https://gerrit.wikimedia.org/r/440909