Bugs item #3605745, was opened at 2013-02-23 02:30
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605745&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: wikidata error
Initial Comment:
Some script says they might work with wikidata, but:
E:\Pywikipedia>interwiki.py -cleanup cs:wikipedie:wikidata -repository
Getting 1 page from wikipedia:cs...
[[cs:Wikipedie:Wikidata]]: [[cs:Wikipedie:Wikidata]] gives new interwiki [[simpl
e:Wikipedia:Wikidata]]
[[cs:Wikipedie:Wikidata]]: [[cs:Wikipedie:Wikidata]] gives new interwiki [[en:Wi
kipedia:Wikidata]]
[[cs:Wikipedie:Wikidata]]: [[cs:Wikipedie:Wikidata]] gives new interwiki [[fr:Wi
kipédia:Wikidata]]
[[cs:Wikipedie:Wikidata]]: [[cs:Wikipedie:Wikidata]] gives new interwiki [[de:Wi
kipedia:Wikidata]]
[[cs:Wikipedie:Wikidata]]: [[cs:Wikipedie:Wikidata]] gives new interwiki [[hu:Wi
kipédia:Wikidata]]
[[cs:Wikipedie:Wikidata]]: [[cs:Wikipedie:Wikidata]] gives new interwiki [[sv:Wi
kipedia:Wikidata]]
Getting 1 page from wikipedia:simple...
Getting 1 page from wikidata:wikidata...
Traceback (most recent call last):
File "E:\Pywikipedia\pagegenerators.py", line 1222, in __iter__
for loaded_page in self.preload(somePages):
File "E:\Pywikipedia\pagegenerators.py", line 1241, in preload
pywikibot.getall(site, pagesThisSite)
File "E:\Pywikipedia\wikipedia.py", line 5289, in getall
_GetAll(site, pages, throttle, force).run()
File "E:\Pywikipedia\wikipedia.py", line 4908, in run
data = self.getData()
File "E:\Pywikipedia\wikipedia.py", line 5078, in getData
pagenames = u'\r\n'.join(pagenames)
TypeError: sequence item 0: expected string or Unicode, NoneType found
sequence item 0: expected string or Unicode, NoneType found
Dump cs (wikipedia) appended.
Traceback (most recent call last):
File "E:\Pywikipedia\interwiki.py", line 2602, in <module>
main()
File "E:\Pywikipedia\interwiki.py", line 2576, in main
bot.run()
File "E:\Pywikipedia\interwiki.py", line 2309, in run
self.queryStep()
File "E:\Pywikipedia\interwiki.py", line 2282, in queryStep
self.oneQuery()
File "E:\Pywikipedia\interwiki.py", line 2278, in oneQuery
subject.batchLoaded(self)
File "E:\Pywikipedia\interwiki.py", line 1338, in batchLoaded
(skip, alternativePage) = self.disambigMismatch(page, counter)
File "E:\Pywikipedia\interwiki.py", line 1122, in disambigMismatch
elif not self.originPage.isDisambig() and page.isDisambig():
File "E:\Pywikipedia\wikipedia.py", line 1563, in isDisambig
self.templates())
File "E:\Pywikipedia\wikipedia.py", line 2799, in templates
get_redirect=get_redirect)]))
File "E:\Pywikipedia\wikipedia.py", line 2818, in templatesWithParams
thistxt = removeDisabledParts(thistxt)
File "E:\Pywikipedia\pywikibot\textlib.py", line 225, in removeDisabledParts
return toRemoveR.sub('', text)
TypeError: expected string or buffer
E:\Pywikipedia>version.py
Pywikipedia trunk/pywikipedia/ (r11103, 2013/02/22, 16:14:56, ok)
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605745&group_…
Feature Requests item #3605726, was opened at 2013-02-22 18:45
Message generated for change (Settings changed) made by pathoschild
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3605726&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jesse Plamondon-Willard (pathoschild)
Assigned to: Nobody/Anonymous (nobody)
Summary: Let bots use canonical namespaces
Initial Comment:
Let bots use canonical namespaces instead of translations from the family files. This is useful for crosswiki bots, where invalid namespace names may not be detected by the operator (most recently [1][2]).
The attached patch implements this by adding an optional constructor argument to Page. For example, the current behaviour is unchanged:
ns = wikipedia.Page(site, title).namespaceName() # Utilisateur:Pathoschild
But a constructor argument enables canonical namespaces:
ns = wikipedia.Page(site, title, translateNamespace=False).namespaceName() # User:Pathoschild
[1] http://meta.wikimedia.org/wiki/User_talk:Pathoschild?oldid=5269904#Probl.C3…
[2] http://meta.wikimedia.org/wiki/User_talk:Pathoschild?oldid=5269904#Polish_W…
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3605726&group_…
Feature Requests item #3605726, was opened at 2013-02-22 18:45
Message generated for change (Tracker Item Submitted) made by pathoschild
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3605726&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: featured
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jesse Plamondon-Willard (pathoschild)
Assigned to: Nobody/Anonymous (nobody)
Summary: Let bots use canonical namespaces
Initial Comment:
Let bots use canonical namespaces instead of translations from the family files. This is useful for crosswiki bots, where invalid namespace names may not be detected by the operator (most recently [1][2]).
The attached patch implements this by adding an optional constructor argument to Page. For example, the current behaviour is unchanged:
ns = wikipedia.Page(site, title).namespaceName() # Utilisateur:Pathoschild
But a constructor argument enables canonical namespaces:
ns = wikipedia.Page(site, title, translateNamespace=False).namespaceName() # User:Pathoschild
[1] http://meta.wikimedia.org/wiki/User_talk:Pathoschild?oldid=5269904#Probl.C3…
[2] http://meta.wikimedia.org/wiki/User_talk:Pathoschild?oldid=5269904#Polish_W…
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3605726&group_…
Bugs item #3605408, was opened at 2013-02-20 03:39
Message generated for change (Comment added) made by reza1615
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605408&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: update items in wikidata
Initial Comment:
I want to add new lang to an item in wikidata I use this code it says page is updated but it doesn't change page!
dataSite=wikipedia.getSite('wikidata','wikidata')
data = pywikibot.DataPage(dataSite, 'Q1234')
lang='fa'
fa_title='تست'
data.setitem(summary,items={'type': u'item', 'label': lang, 'value': fa_title})
data.setitem(summary,items={'type': u'sitelink', 'site': lang, 'title': fa_title})
----------------------------------------------------------------------
Comment By: reza (reza1615)
Date: 2013-02-22 03:20
Message:
I confused :)
please write two simple examples which can
1-add a new item to wikidata
2-add a lang , title and lable to existing item
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2013-02-22 02:20
Message:
you first must call
data.get()
before changing a DataPage,otherwise the DataPage.title() is unknown
----------------------------------------------------------------------
Comment By: reza (reza1615)
Date: 2013-02-21 09:14
Message:
as you said I wrote the code
#!/usr/bin/python
# -*- coding: utf-8 -*-
import wikipedia
lang='fa'
fa_title=u'آبشار لاتون'
summary=u'آبشار لاتون,آبشار لاتون'
site=wikipedia.getSite('fa',fam='wikipedia')
page=wikipedia.Page(site,fa_title)
data=wikipedia.DataPage(page)
data.setitem(summary,items={'type': u'item', 'label': lang, 'value':
fa_title})
data.setitem(summary,items={'type': u'sitelink', 'site': lang, 'title':
fa_title})
it shows
Sleeping for 19.6 seconds, 2013-02-21 17:10:27
Updating page [[wikidata:None]] via API
Sleeping for 19.6 seconds, 2013-02-21 17:10:47
Updating page [[wikidata:None]] via API
it doesn't edit wikidata and add fa interwiki to Q5058182
----------------------------------------------------------------------
Comment By: Amir (amird)
Date: 2013-02-21 08:46
Message:
btw: there is difference between changing an entity and making a item. I'm
working on making an item via API, but John Blad (API manager of wikidata)
is in the vaction. I'll add this feature to the PWB ASAP
----------------------------------------------------------------------
Comment By: Amir (amird)
Date: 2013-02-21 08:42
Message:
i know the difference between wikipedia and wikidata,. when i say do it,
trust me and do it, for god's sake. if didn't work tell me
----------------------------------------------------------------------
Comment By: reza (reza1615)
Date: 2013-02-21 08:30
Message:
this my code
#!/usr/bin/python
# -*- coding: utf-8 -*-
import wikipedia
dataSite=wikipedia.getSite('wikidata','wikidata')
lang='fa'
fa_title=u'قنات آب خنک، بیرجند'
summary=u'قنات آب خنک، بیرجند, قنات آب خنک،
بیرجند'
page=wikipedia.Page(dataSite,fa_title)
data = wikipedia.DataPage(page)
data.setitem(summary,items={'type': u'item', 'label': lang, 'value':
fa_title})
data.setitem(summary,items={'type': u'sitelink', 'site': lang, 'title':
fa_title})
it shows me this message
Sleeping for 9.6 seconds, 2013-02-21 16:27:25
Updating page [[wikidata:قنات آب خنک، بیرجند]] via API
Sleeping for 9.6 seconds, 2013-02-21 16:27:35
Updating page [[wikidata:قنات آب خنک، بیرجند]] via API
but it don't edit wikidata! and if you check this page you can not find it!
----------------------------------------------------------------------
Comment By: reza (reza1615)
Date: 2013-02-21 08:13
Message:
@amir if I why should I write
site=wikipedia.getSite('fa',fam='wikipedia')
I want to edit in wikidata not fa.wiki.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2013-02-20 23:49
Message:
you may also use
data = wikipedia.DataPage(1234)
for creating the repository Page
or
site = wikipedia.getSite()
data = wikipedia.DataPage(site.data_repository(), "Q1234")
----------------------------------------------------------------------
Comment By: Amir (amird)
Date: 2013-02-20 04:03
Message:
you must run it in this way:
site=wikipedia.getSite('fa',fam='wikipedia')
page=wikipedia.Page(site,'تست')
data=wikipedia.DataPage(page)
data.setitem(summary,items={'type': u'item', 'label': lang, 'value':
fa_title})
data.setitem(summary,items={'type': u'sitelink', 'site': lang, 'title':
fa_title})
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605408&group_…
Bugs item #3605408, was opened at 2013-02-20 03:39
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605408&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: update items in wikidata
Initial Comment:
I want to add new lang to an item in wikidata I use this code it says page is updated but it doesn't change page!
dataSite=wikipedia.getSite('wikidata','wikidata')
data = pywikibot.DataPage(dataSite, 'Q1234')
lang='fa'
fa_title='تست'
data.setitem(summary,items={'type': u'item', 'label': lang, 'value': fa_title})
data.setitem(summary,items={'type': u'sitelink', 'site': lang, 'title': fa_title})
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2013-02-22 02:20
Message:
you first must call
data.get()
before changing a DataPage,otherwise the DataPage.title() is unknown
----------------------------------------------------------------------
Comment By: reza (reza1615)
Date: 2013-02-21 09:14
Message:
as you said I wrote the code
#!/usr/bin/python
# -*- coding: utf-8 -*-
import wikipedia
lang='fa'
fa_title=u'آبشار لاتون'
summary=u'آبشار لاتون,آبشار لاتون'
site=wikipedia.getSite('fa',fam='wikipedia')
page=wikipedia.Page(site,fa_title)
data=wikipedia.DataPage(page)
data.setitem(summary,items={'type': u'item', 'label': lang, 'value':
fa_title})
data.setitem(summary,items={'type': u'sitelink', 'site': lang, 'title':
fa_title})
it shows
Sleeping for 19.6 seconds, 2013-02-21 17:10:27
Updating page [[wikidata:None]] via API
Sleeping for 19.6 seconds, 2013-02-21 17:10:47
Updating page [[wikidata:None]] via API
it doesn't edit wikidata and add fa interwiki to Q5058182
----------------------------------------------------------------------
Comment By: Amir (amird)
Date: 2013-02-21 08:46
Message:
btw: there is difference between changing an entity and making a item. I'm
working on making an item via API, but John Blad (API manager of wikidata)
is in the vaction. I'll add this feature to the PWB ASAP
----------------------------------------------------------------------
Comment By: Amir (amird)
Date: 2013-02-21 08:42
Message:
i know the difference between wikipedia and wikidata,. when i say do it,
trust me and do it, for god's sake. if didn't work tell me
----------------------------------------------------------------------
Comment By: reza (reza1615)
Date: 2013-02-21 08:30
Message:
this my code
#!/usr/bin/python
# -*- coding: utf-8 -*-
import wikipedia
dataSite=wikipedia.getSite('wikidata','wikidata')
lang='fa'
fa_title=u'قنات آب خنک، بیرجند'
summary=u'قنات آب خنک، بیرجند, قنات آب خنک،
بیرجند'
page=wikipedia.Page(dataSite,fa_title)
data = wikipedia.DataPage(page)
data.setitem(summary,items={'type': u'item', 'label': lang, 'value':
fa_title})
data.setitem(summary,items={'type': u'sitelink', 'site': lang, 'title':
fa_title})
it shows me this message
Sleeping for 9.6 seconds, 2013-02-21 16:27:25
Updating page [[wikidata:قنات آب خنک، بیرجند]] via API
Sleeping for 9.6 seconds, 2013-02-21 16:27:35
Updating page [[wikidata:قنات آب خنک، بیرجند]] via API
but it don't edit wikidata! and if you check this page you can not find it!
----------------------------------------------------------------------
Comment By: reza (reza1615)
Date: 2013-02-21 08:13
Message:
@amir if I why should I write
site=wikipedia.getSite('fa',fam='wikipedia')
I want to edit in wikidata not fa.wiki.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2013-02-20 23:49
Message:
you may also use
data = wikipedia.DataPage(1234)
for creating the repository Page
or
site = wikipedia.getSite()
data = wikipedia.DataPage(site.data_repository(), "Q1234")
----------------------------------------------------------------------
Comment By: Amir (amird)
Date: 2013-02-20 04:03
Message:
you must run it in this way:
site=wikipedia.getSite('fa',fam='wikipedia')
page=wikipedia.Page(site,'تست')
data=wikipedia.DataPage(page)
data.setitem(summary,items={'type': u'item', 'label': lang, 'value':
fa_title})
data.setitem(summary,items={'type': u'sitelink', 'site': lang, 'title':
fa_title})
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605408&group_…
Bugs item #3605596, was opened at 2013-02-21 16:42
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605596&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: redirect
Group: None
Status: Open
Resolution: None
Priority: 5
Private: Yes
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: 2 redirects on a page: all replaced, instead the first only
Initial Comment:
English Wikipedia: If a redirect page contains more than one redirect, redirect.py - on handling redirects which point to other redirects - doesn't work correctly, see [[en:ANSCA]] (AvocatoBot uses redirect.py): all redirects will be replaced, only the first should.
Maybe, replacement (in redirect.py) of
text = self.site.redirectRegex().sub(
'#%s %s' % (self.site.redirect(),
targetPage.title(asLink=True, textlink=True)),
oldText)
by
text = self.site.redirectRegex().sub(
'#%s %s' % (self.site.redirect(),
targetPage.title(asLink=True, textlink=True)),
oldText,
count = 1)
could correct the error.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605596&group_…
Bugs item #3605546, was opened at 2013-02-21 08:04
Message generated for change (Comment added) made by jandudik
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605546&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: reza (reza1615)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki.py for other namespaces for en, it, hu, he
Initial Comment:
Hi after https://www.mediawiki.org/wiki/Special:Code/pywikipedia/11073 we can not add interwiki to categories and according to wikidata we can not add none article pages to wikidata.
please solve this problem now many categories needs interwiki and we made many categories (by bot) which are only connected to en.wiki!
----------------------------------------------------------------------
Comment By: JAn (jandudik)
Date: 2013-02-21 13:53
Message:
And there is some way to adding interwiki using pywikipedia bot?
How?
In documentation is nothing...
----------------------------------------------------------------------
Comment By: JAn (jandudik)
Date: 2013-02-21 13:52
Message:
http://www.wikidata.org/wiki/Wikidata:Requests_for_comment/Inclusion_of_non…
<cite>I belive that we have reach now a strong concensus: pages of all
namespaces exept User: are allowed into Wikidata</cite>
----------------------------------------------------------------------
Comment By: reza (reza1615)
Date: 2013-02-21 09:32
Message:
Wikidata:Requests for comment/Inclusion of non-article pages
is the link of decision for not to add other namespaces! so we should user
interwikibot for other namespaces
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605546&group_…
Bugs item #3605546, was opened at 2013-02-21 08:04
Message generated for change (Comment added) made by jandudik
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605546&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: reza (reza1615)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki.py for other namespaces for en, it, hu, he
Initial Comment:
Hi after https://www.mediawiki.org/wiki/Special:Code/pywikipedia/11073 we can not add interwiki to categories and according to wikidata we can not add none article pages to wikidata.
please solve this problem now many categories needs interwiki and we made many categories (by bot) which are only connected to en.wiki!
----------------------------------------------------------------------
Comment By: JAn (jandudik)
Date: 2013-02-21 13:52
Message:
http://www.wikidata.org/wiki/Wikidata:Requests_for_comment/Inclusion_of_non…
<cite>I belive that we have reach now a strong concensus: pages of all
namespaces exept User: are allowed into Wikidata</cite>
----------------------------------------------------------------------
Comment By: reza (reza1615)
Date: 2013-02-21 09:32
Message:
Wikidata:Requests for comment/Inclusion of non-article pages
is the link of decision for not to add other namespaces! so we should user
interwikibot for other namespaces
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605546&group_…
Bugs item #3605546, was opened at 2013-02-21 08:04
Message generated for change (Comment added) made by reza1615
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605546&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: reza (reza1615)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki.py for other namespaces for en, it, hu, he
Initial Comment:
Hi after https://www.mediawiki.org/wiki/Special:Code/pywikipedia/11073 we can not add interwiki to categories and according to wikidata we can not add none article pages to wikidata.
please solve this problem now many categories needs interwiki and we made many categories (by bot) which are only connected to en.wiki!
----------------------------------------------------------------------
>Comment By: reza (reza1615)
Date: 2013-02-21 09:32
Message:
Wikidata:Requests for comment/Inclusion of non-article pages
is the link of decision for not to add other namespaces! so we should user
interwikibot for other namespaces
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605546&group_…