Jump to content
MediaWiki

Manual talk:Pywikibot/unusedfiles.py

Add topic
From mediawiki.org
This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made.

Error when running bot on my wiki

[edit ]
Latest comment: 5 years ago 5 comments2 people in discussion

Hi,

I'm getting the following error when running the unusedfiles script on my wiki:


Traceback (most recent call last):

File "C:\Pywikipedia\unusedfiles.py", line 145, in <module>

main()

File "C:\Pywikipedia\unusedfiles.py", line 134, in main

bot = UnusedFilesBot(site=site, generator=gen, **options)

File "C:\Pywikipedia\unusedfiles.py", line 65, in __init__

'site.'.format(self.site))

pywikibot.i18n.TranslationError: This script is not localized for wikisimpsons:en site.

<class 'pywikibot.i18n.TranslationError'>

CRITICAL: Closing network session.


Other scripts seem to work fine, it's just this one I'm having problems with. Does anyone know what the problem is? Thanks. Solar Dragon (talk) 12:59, 10 September 2019 (UTC) Reply

Hello, what is the output of the version.py file? (python pwb.py version) Dvorapa (talk) 15:30, 10 September 2019 (UTC) Reply
Pywikibot: pywikibot/__init__.py (, -1 (unknown), 2018年02月07日, 19:02:09, UNKNOWN)
Release version: 3.0-dev
requests version: 2.20.1
 cacerts: C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\certifi\cacert.pem
 certificate test: ok
Python: 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)]
PYWIKIBOT2_DIR: Not set
PYWIKIBOT2_DIR_PWB: Not set
PYWIKIBOT2_NO_USER_CONFIG: Not set
Config base dir: C:\Pywikipedia
Usernames for family "wikisimpsons":
 en: SolarBot (also sysop)
Solar Dragon (talk) 17:22, 10 September 2019 (UTC) Reply
This looks like is classic issue, when you don't have correct version of i18n submodule for your version of Pywikibot. I would suggest to update both Pywikibot and i18n submodule to the latest stable version, see Manual:Pywikibot/Installation#Updating Pywikibot or Manual:Pywikibot/Gerrit#For users Dvorapa (talk) 17:54, 10 September 2019 (UTC) Reply
Another option would be to reinstall Pywikibot from scratch (make sure to backup your configuration files and scripts first) Dvorapa (talk) 17:57, 10 September 2019 (UTC) Reply

AltStyle によって変換されたページ (->オリジナル) /