Page MenuHomePhabricator

noreferences.py error
Closed, ResolvedPublic

Description

Found ref without references.
Traceback (most recent call last):

File "pwb.py", line 297, in <module>
  if not main():
File "pwb.py", line 292, in main
  run_python_file(filename, [filename] + args, argvu, file_package)
File "pwb.py", line 96, in run_python_file
  main_mod.__dict__)
File "./scripts/noreferences.py", line 778, in <module>
  main()
File "./scripts/noreferences.py", line 770, in main
  bot.run()
File "./scripts/noreferences.py", line 711, in run
  newText = self.addReferences(text)
File "./scripts/noreferences.py", line 572, in addReferences
  for section in i18n.translate(self.site, referencesSections):

TypeError: 'NoneType' object is not iterable
CRITICAL: Exiting due to uncaught exception <class 'TypeError'>

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptThu, Nov 14, 4:05 AM
Xqt added a subscriber: Xqt.Thu, Nov 14, 5:50 AM

Seems there is not L10N object found in referencesSections dict for the given site. Which site are you using?

Probably the error message could be more informative than just this Type error.

Seems there is not L10N object found in referencesSections dict for the given site. Which site are you using?
Probably the error message could be more informative than just this Type error.

When I'm using in my laptop noreferences.py script it's run correctly but when I'm using in toolforge it's error is coming

What Wikipedia do you scan using noreferences? What is the command you run? What is the output of python pwb.py version (if installed from Git/svn or zip file)?

What Wikipedia do you scan using noreferences? What is the command you run? What is the output of python pwb.py version (if installed from Git/svn or zip file)?

this comes
Pywikibot: [https] r-pywikibot-core.git (4a1f25a, g11634, 2019/11/14, 17:31:14, OUTDATED)
Release version: 3.1.dev0
requests version: 2.22.0

Kaleem_Bhatti added a comment.EditedSat, Nov 16, 4:39 AM

@Dvorapa can you tell me please how I can find this directory
/mnt/nfs/labstore-secondary-tools-project/toolname/core

It's a "core" folder in your home directory I believe. The error says your Wikipedia (wikiproject) is missing in the script's configuration. We want to add it there.

It's a "core" folder in your home directory I believe. The error says your Wikipedia (wikiproject) is missing in the script's configuration. We want to add it there.

I'm running in sindhi (sd) wikipedia

@Dvorapa how I can open or edit core folder and scripts

It depends how you installed them.

It depends how you installed them.

I have intalled from git

Then it is where you installed it

Then it is where you installed it

from here
$ git clone --recursive --branch stable
https://gerrit.wikimedia.org/r/pywikibot/core.git pywikibot-core
$ cd pywikibot-core

Dvorapa closed this task as Resolved.Sat, Nov 16, 7:48 PM
Dvorapa assigned this task to Kaleem_Bhatti.

The issue seems to be fixed by https://gerrit.wikimedia.org/r/#/c/pywikibot/core/+/546388/ in the current master => so it should be fixed in the next stable release

Then it is where you installed it

from here
$ git clone --recursive --branch stable
https://gerrit.wikimedia.org/r/pywikibot/core.git pywikibot-core
$ cd pywikibot-core

@Dvorapa please tell me this

I'm happy to help, but please ask again, currently I don't understand

@Dvorapa how I can find this core directore
/mnt/nfs/labstore-secondary-tools-project/toolname/pywikibot-core
I have installet it from git and here
$ git clone --recursive --branch stable
https://gerrit.wikimedia.org/r/pywikibot/core.git pywikibot-core
$ cd pywikibot-core

I want edit scripts from "core" directory

Your "core" directory is pywikibot-core, where you cloned Pywikibot. /mnt/nfs/labstore-secondary-tools-project/toolname/pywikibot-core is the same.

Your "core" directory is pywikibot-core, where you cloned Pywikibot. /mnt/nfs/labstore-secondary-tools-project/toolname/pywikibot-core is the same.

/mnt/nfs/labstore-secondary-tools-project/kaleem-bot/pywikibot-core
this is i have createad on toolforge