Page MenuHomePhabricator

NotImplementedWarning: parameters not being a mapping is deprecated.
Closed, InvalidPublic

Description

Processing [[meta:MediaWiki talk:Sidebar]]
5 Threads found on [[meta:MediaWiki talk:Sidebar]]
Looking for: {{User:MiszaBot/config}} in [[meta:MediaWiki talk:Sidebar]]
Processing 5 threads
WARNING: .\scripts\archivebot.py:156: _NotImplementedWarning: parameters not being a mapping is deprecated.
  exp = i18n.translate(site.code, template, int(string[:-1]))

Not sure what it refers to. Thanks.

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJul 21 2016, 3:07 PM
Mpaa added a subscriber: Mpaa.Jul 21 2016, 7:47 PM

Are you sure you are using the latest version?

MarcoAurelio added a comment.EditedJul 21 2016, 7:54 PM

Aparently yes?

MINGW64 /f/MWDEV/pwb (master)
$ git pull origin master
From https://gerrit.wikimedia.org/r/pywikibot/core
 * branch            master     -> FETCH_HEAD
Already up-to-date.

$ git reset --hard
HEAD is now at 77e0d66 __init__.py: Specify the rtype for Site

MINGW64 /f/MWDEV/pwb (master)
$ git pull origin master --force
From https://gerrit.wikimedia.org/r/pywikibot/core
 * branch            master     -> FETCH_HEAD
Already up-to-date.

MINGW64 /f/MWDEV/pwb (master)
$ git submodule update

MINGW64 /f/MWDEV/pwb (master)
$ git submodule update --force
Submodule path 'scripts/i18n': checked out '8e949fce7f77cc97f682780010c0bcc2e2de8f14'

Please advice.

Best regards.

Mpaa added a comment.Jul 21 2016, 9:15 PM

Hhmm

python scripts/version.py 
Pywikibot: [ssh] pywikibot-core.git (77e0d66, g7359, 2016/07/18, 19:27:35, n/a)

I have he following @archivebot.py:167

exp = i18n.translate(site.code, template, {'$1': int(string[:-1])})

I have the same at L:167@archivebot.py

exp = i18n.translate(site.code, template, {'$1': int(string[:-1])})

pwb.py version gives the following output:

F:\MWDEV\pwb>pwb.py version
Pywikibot: pywikibot/__init__.py (70771dd, -1 (unknown), 2016/07/18, 20:20:42, n/a)
Release version: 3.0-dev
requests version: 2.10.0
Python: 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)]

Repo cloned is https://gerrit.wikimedia.org/r/pywikibot/core

Best regards.

Mpaa added a comment.Jul 22 2016, 12:01 PM

Then I do not know, I cannot find

exp = i18n.translate(site.code, template, int(string[:-1]))
Mpaa added a comment.Jul 24 2016, 6:44 PM

@MarcoAurelio, could you make sure you still have this issue? As I think it is obsolete code.

@MarcoAurelio, could you make sure you still have this issue? As I think it is obsolete code.

I can't reproduce anylonger, at least for now.

However I've got today:

Looking for: {{Usuario:MABot/config}} in [[an:Wikipedia:Tabierna/Propuestas]]
Processing 6 threads
Archiving 4 thread(s).
ERROR: Error occurred while processing page [[an:Wikipedia:Tabierna/Propuestas]]
ERROR: ValueError: unsupported format character '|' (0x7c) at index 43
Traceback (most recent call last):
  File ".\scripts\archivebot.py", line 733, in main
    archiver.run()
  File ".\scripts\archivebot.py", line 623, in run
    self.comment_params)
  File "F:\MWDEV\pywikibot-core\pywikibot\i18n.py", line 656, in twtranslate
    return trans % parameters
ValueError: unsupported format character '|' (0x7c) at index 43Processing [[an:Wikipedia:Tabierna/Tecnica]]

Thanks.

whym added a subscriber: whym.Sep 19 2016, 10:10 AM

@MarcoAurelio It looks like your i18n files are old. Recent edits should have fixed it. Can you try `git submodule update`?

See https://www.mediawiki.org/wiki/Manual:Pywikibot/Gerrit#For_users for more.

Sorry, I almost forgot about this bug. I no longer run archivebot.py in my laptop and I've moved it to Tool Labs. That said, I deleted the .out files of the crontab that manages this task so I cannot tell you if this is still happening. I think it's not happening anymore, but let's see if some errors appear in the next run. If not, I'd say to close.

whym added a comment.Sep 27 2016, 12:49 PM

let's see if some errors appear in the next run.

What was the result?

Xqt closed this task as Invalid.Sep 29 2016, 4:41 AM

The code is deprecated. The change was made in
rPWBCf96151900aa1c281bebab5136534881a33e39052

Please update the local repository.