Did you change pagegenerators.GeneratorFactory? Mine doesn't have a site parameter...

In any case, the following allows me to reproduce your error:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
# -*- coding: utf-8  -*-

# Fields to fill:
username = u"YourUsername"

import pywikibot
from pywikibot import family, pagegenerators
from scripts.replace import ReplaceRobot

class KdeFamily(family.Family):

    def __init__(self):
        super(KdeFamily, self).__init__()

    def version(self, code):
        return "1.20.2"

    def scriptpath(self, code):
        return ''

class TechbaseFamily(KdeFamily):

    def __init__(self):
        super(TechbaseFamily, self).__init__()
        self.name = 'techbase'
        self.langs['en'] = u"techbase.kde.org"

site = pywikibot.Site("en", TechbaseFamily(), username)

generator = pagegenerators.AllpagesPageGenerator(u"Localization", 0, False, site=site)
preloadingGen = pagegenerators.PreloadingGenerator(generator)

bot = ReplaceRobot(generator=preloadingGen, replacements=[])
bot.run()

[bugs:#1658] “Title contains illegal char (\uFFFD)” with existing page

Status: open
Labels: character encoding
Created: Sun Aug 25, 2013 08:00 AM UTC by Adrián Chaves Fernández
Last Updated: Sun Aug 25, 2013 01:08 PM UTC
Owner: nobody

This is happening with the following existing page: http://techbase.kde.org/Localization/fy/Fryske_kompjûterwurden

Traceback (most recent call last):
File "maintenance.py", line 81, in
main()
File "maintenance.py", line 77, in main
bot.run()
File "/home/gallaecio/fontes/rodela/scripts/replace.py", line 326, in run
for page in self.generator:
File "/home/gallaecio/fontes/rodela/pywikibot/pagegenerators.py", line 799, in PreloadingGenerator
for page in generator:
File "/home/gallaecio/fontes/rodela/pywikibot/pagegenerators.py", line 749, in DuplicateFilterPageGenerator
for page in generator:
File "/home/gallaecio/fontes/rodela/pywikibot/data/api.py", line 706, in iter
yield self.result(item)
File "/home/gallaecio/fontes/rodela/pywikibot/data/api.py", line 780, in result
p = pywikibot.Page(self.site, pagedata['title'], pagedata['ns'])
File "/home/gallaecio/fontes/rodela/pywikibot/init.py", line 249, in wrapper
return method(args, **kw)
File "/home/gallaecio/fontes/rodela/pywikibot/init.py", line 249, in wrapper
return method(
args, **kw)
File "/home/gallaecio/fontes/rodela/pywikibot/page.py", line 77, in init
self._link = Link(title, source=source, defaultNamespace=ns)
File "/home/gallaecio/fontes/rodela/pywikibot/page.py", line 2958, in init
raise pywikibot.Error("Title contains illegal char (\uFFFD)")


Sent from sourceforge.net because Pywikipedia-bugs@lists.wikimedia.org is subscribed to https://sourceforge.net/p/pywikipediabot/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/pywikipediabot/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.