[Pywikipedia-bugs] [Maniphest] [Reassigned] T119226: Very small (or very large) quantity values (represented in scientific notation) result in error in add/update via pywikibot/wikidata API

2022-08-22 Thread DD063520
DD063520 reassigned this task from DD063520 to Aklapper.
DD063520 added a comment.


  Sorry, I'm not able to perform this task. I was not even aware it was 
assigned to me.

TASK DETAIL
  https://phabricator.wikimedia.org/T119226

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Aklapper, DD063520
Cc: Addshore, matej_suchanek, Xqt, Liuxinyu970226, DD063520, thiemowmde, 
Tobias1984, Aklapper, StudiesWorld, pywikibot-bugs-list, ArthurPSmith, 
Astuthiodit_1, karapayneWMDE, Invadibot, PotsdamLamb, Jyoo1011, maantietaja, 
JohnsonLee01, SHEKH, Dijkstra, ItamarWMDE, Khutuck, Akuckartz, Zkhalido, 
Viztor, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, Altostratus, 
Avicennasis, Scott_WUaS, mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, 
Masti, Alchimista, Mbch331
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T119226: Very small (or very large) quantity values (represented in scientific notation) result in error in add/update via pywikibot/wikidata API

2022-08-22 Thread DD063520
DD063520 added a comment.


  Sorry, I'm not able to perform this task. I was not even aware it was 
assigned to me.

TASK DETAIL
  https://phabricator.wikimedia.org/T119226

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Addshore, matej_suchanek, Xqt, Liuxinyu970226, DD063520, thiemowmde, 
Tobias1984, Aklapper, StudiesWorld, pywikibot-bugs-list, ArthurPSmith, 
Astuthiodit_1, karapayneWMDE, Invadibot, PotsdamLamb, Jyoo1011, maantietaja, 
JohnsonLee01, SHEKH, Dijkstra, ItamarWMDE, Khutuck, Akuckartz, Zkhalido, 
Viztor, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, Altostratus, 
Avicennasis, Scott_WUaS, mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, 
Masti, Alchimista, Mbch331, RhinosF1
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T270949: Cannot login into private wikibase using pywikibot

2021-03-05 Thread DD063520
DD063520 added a comment.


  ok, working! thank you!

TASK DETAIL
  https://phabricator.wikimedia.org/T270949

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt, DD063520
Cc: zhuyifei1999, Huji, Xqt, pywikibot-bugs-list, Dhayanthdharma, DD063520, 
Aklapper, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, 
Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, 
Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, 
dachary, Lewizho99, Mdupont, JJMC89, Maathavan, Metamorforme42, Dvorapa, 
Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T270949: Cannot login into private wikibase using pywikibot

2021-03-05 Thread DD063520
DD063520 added a comment.


  II used this patch:
  
  https://gerrit.wikimedia.org/r/c/pywikibot/core/+/668661
  
  and I think it is rather not working 
  
  WARNING: No user is logged in on site my:my
  
  could be an error on my side but I would not know which one ...

TASK DETAIL
  https://phabricator.wikimedia.org/T270949

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt, DD063520
Cc: zhuyifei1999, Huji, Xqt, pywikibot-bugs-list, Dhayanthdharma, DD063520, 
Aklapper, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, 
Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, 
Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, 
dachary, Lewizho99, Mdupont, JJMC89, Maathavan, Metamorforme42, Dvorapa, 
Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T270949: Cannot login into private wikibase using pywikibot

2021-03-05 Thread DD063520
DD063520 added a comment.


  @Xqt: so one bug is gone, i.e. the configuration file is taken into account:
  
  user-config.py looks like
  
from pywikibot.config2 import usernames, register_families_folder

user_families_paths = ['./config']
mylang = "my"
family = "my"
usernames['my']['my'] = u'WikidataUpdater'
password_file = "user-password.py"
  
  and
  
import pywikibot

wikibase = pywikibot.Site("my", "my")
wikibase_repo = wikibase.data_repository()

print("start")
item = pywikibot.ItemPage(wikibase_repo, 'Q235272')  # a repository item
data = item.get()  # get all item data from repository for this item
print(data)

data={}
data['labels'] = {'en': 'Test'}
item.editEntity(data)
  
  Nice and clean! : ) Now there is still a bug. He can red, but he cannot edit:
  
  pywikibot.exceptions.OtherPageSaveError: Edit to page [[Item:Q235272]] failed:
  User "None" does not have required user right "edit"
  CRITICAL: Exiting due to uncaught exception 

TASK DETAIL
  https://phabricator.wikimedia.org/T270949

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt, DD063520
Cc: zhuyifei1999, Huji, Xqt, pywikibot-bugs-list, Dhayanthdharma, DD063520, 
Aklapper, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, 
Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, 
Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, 
dachary, Lewizho99, Mdupont, JJMC89, Maathavan, Metamorforme42, Dvorapa, 
Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T270949: Cannot login into private wikibase using pywikibot

2021-03-05 Thread DD063520
DD063520 added a comment.


  If you explain me how to test it, I will do. How to I download the code with 
the latest commits?

TASK DETAIL
  https://phabricator.wikimedia.org/T270949

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt, DD063520
Cc: zhuyifei1999, Huji, Xqt, pywikibot-bugs-list, Dhayanthdharma, DD063520, 
Aklapper, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, 
Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, 
Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, 
dachary, Lewizho99, Mdupont, JJMC89, Maathavan, Metamorforme42, Dvorapa, 
Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T270949: Cannot login into private wikibase using pywikibot

2021-03-05 Thread DD063520
DD063520 added a comment.


  @Xqt: it is this commit -e 
git+https://github.com/wikimedia/pywikibot.git@083ed9341881f562167e732974df35ee051ba994#egg=pywikibot,
 so it is not even a version 

TASK DETAIL
  https://phabricator.wikimedia.org/T270949

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt, DD063520
Cc: zhuyifei1999, Huji, Xqt, pywikibot-bugs-list, Dhayanthdharma, DD063520, 
Aklapper, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, 
Wenyi, Tbscho, MayS, dachary, Mdupont, JJMC89, Metamorforme42, Dvorapa, 
Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T270949: Cannot login into private wikibase using pywikibot

2021-03-05 Thread DD063520
DD063520 added a comment.


  Thank you

TASK DETAIL
  https://phabricator.wikimedia.org/T270949

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Xqt, pywikibot-bugs-list, Dhayanthdharma, DD063520, Aklapper, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
dachary, Mdupont, JJMC89, Metamorforme42, Dvorapa, Altostratus, Avicennasis, 
mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T270949: Cannot login into private wikibase using pywikibot

2021-03-04 Thread DD063520
DD063520 added a project: Pywikibot.
Restricted Application added a subscriber: pywikibot-bugs-list.

TASK DETAIL
  https://phabricator.wikimedia.org/T270949

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt, DD063520
Cc: pywikibot-bugs-list, Dhayanthdharma, DD063520, Aklapper, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
dachary, Mdupont, JJMC89, Metamorforme42, Dvorapa, Altostratus, Avicennasis, 
mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Claimed] T119226: Very small (or very large) quantity values (represented in scientific notation) result in error in add/update via pywikibot/wikidata API

2020-02-14 Thread DD063520
DD063520 claimed this task.
DD063520 added a comment.


  No, problem  there is still time to do it ; ) . of I see what  
@thiemowmde means. But I'm not sure if I can implement this. The problem is 
that there can be precision problems if it is done as I propose, right?

TASK DETAIL
  https://phabricator.wikimedia.org/T119226

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Xqt, Liuxinyu970226, DD063520, thiemowmde, Tobias1984, Aklapper, 
StudiesWorld, pywikibot-bugs-list, ArthurPSmith, Zkhalido, darthmon_wmde, 
Viztor, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, Altostratus, 
Avicennasis, Scott_WUaS, mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, 
Masti, Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T119226: Very small (or very large) quantity values (represented in scientific notation) result in error in add/update via pywikibot/wikidata API

2020-02-14 Thread DD063520
DD063520 added a comment.


  Ok,
  
  I think I found a patch. We can changes this 
https://github.com/wikimedia/pywikibot/blob/2dfe67426c22c3c11cf9be0eabcf538f8848bd48/pywikibot/__init__.py#L847:
  
def toWikibase(self):
"""
Convert the data to a JSON object for the Wikibase API.
@return: Wikibase JSON
@rtype: dict
"""
json = {'amount': self._fromdecimal(self.amount),
'upperBound': self._fromdecimal(self.upperBound),
'lowerBound': self._fromdecimal(self.lowerBound),
'unit': self.unit
}
return json
  
  to:
  
def toWikibase(self):
"""
Convert the data to a JSON object for the Wikibase API.

@return: Wikibase JSON
@rtype: dict
"""
json = {'amount': 
'{:f}'.format(Decimal(self._fromdecimal(self.amount))),
'upperBound': 
{:f}'.format(Decimal(self._fromdecimal(self.upperBound)),
'lowerBound': 
{:f}'.format(Decimal(self._fromdecimal(self.lowerBound)),
'unit': self.unit
}
return json
  
  Should I submit this? Or do you see any problems?
  
  Salut
  D063520

TASK DETAIL
  https://phabricator.wikimedia.org/T119226

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Liuxinyu970226, DD063520, thiemowmde, Tobias1984, Aklapper, StudiesWorld, 
pywikibot-bugs-list, ArthurPSmith, Zkhalido, darthmon_wmde, Viztor, Nandana, 
Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, LawExplorer, 
Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, Altostratus, Avicennasis, 
Scott_WUaS, mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Masti, 
Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T119226: Very small (or very large) quantity values (represented in scientific notation) result in error in add/update via pywikibot/wikidata API

2020-02-14 Thread DD063520
DD063520 added a comment.
Restricted Application added a subscriber: Liuxinyu970226.


  Hello,
  
  I'm also encountering this. I also saw that it is related to this:
  
  https://phabricator.wikimedia.org/T204331
  
  Can we make a pywikibot patch? I tried to make one, but not there yet 
  
  D063520

TASK DETAIL
  https://phabricator.wikimedia.org/T119226

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Liuxinyu970226, DD063520, thiemowmde, Tobias1984, Aklapper, StudiesWorld, 
pywikibot-bugs-list, ArthurPSmith, Zkhalido, darthmon_wmde, Viztor, Nandana, 
Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, LawExplorer, 
Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, Altostratus, Avicennasis, 
Scott_WUaS, mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Masti, 
Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T204331: Wikibase does not accept "+g"-formatted strings as quantities

2020-02-14 Thread DD063520
DD063520 added a comment.


  Hi,
  
  I'm encountering the same problem. I also have seen that this is related to 
this:
  
  https://phabricator.wikimedia.org/T119226
  
  D063520

TASK DETAIL
  https://phabricator.wikimedia.org/T204331

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: DD063520, Addshore, Aklapper, matej_suchanek, pywikibot-bugs-list, 
Zkhalido, darthmon_wmde, Viztor, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, 
QZanden, Tbscho, MayS, LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, 
rosalieper, Altostratus, Avicennasis, Scott_WUaS, mys_721tx, Wikidata-bugs, 
aude, jayvdb, Ricordisamoa, Masti, Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T235500: Pywikibot cannot create new property

2019-12-19 Thread DD063520
DD063520 added a comment.


  Cool thank you!

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: D063520, DD063520
Cc: Mpaa, Addshore, Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, 
Hook696, Daryl-TTMG, RomaAmorRoma, 0010318400, E.S.A-Sheild, Meekrab2012, 
joker88john, Viztor, DannyS712, CucyNoiD, NebulousIris, Wenyi, Gaboe420, 
Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Af420, 
Darkminds3113, Bsandipan, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, 
Tbscho, MayS, WSH1906, Lewizho99, Mdupont, JJMC89, Maathavan, Dvorapa, 
Altostratus, Avicennasis, mys_721tx, jayvdb, Ricordisamoa, Dalba, Masti, 
Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T238404: Pywikibot fails when importing entity Q1410828

2019-11-15 Thread DD063520
DD063520 added a comment.


  Ahhh, my mistake, ok, fine for me. I saw that you opened this:
  https://phabricator.wikimedia.org/T238405
  So for me we can close this one.
  Thank you very much for the help!

TASK DETAIL
  https://phabricator.wikimedia.org/T238404

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Dvorapa, Mpaa, Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, 
darthmon_wmde, Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, 
GoranSMilovanovic, QZanden, Tbscho, MayS, LawExplorer, Mdupont, JJMC89, 
_jensen, rosalieper, Altostratus, Avicennasis, Scott_WUaS, mys_721tx, 
Wikidata-bugs, aude, jayvdb, Dalba, Masti, Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T238404: Pywikibot fails when importing entity Q1410828

2019-11-15 Thread DD063520
DD063520 added a comment.


  Mhmmm  on github I cannot find the "ban" language in the wikipedia_family:
  
  
https://github.com/wikimedia/pywikibot/blob/cbf194a60124fece9355517030aaa7091dcc093a/pywikibot/families/wikipedia_family.py
  
  So would the newest version solve my problem?

TASK DETAIL
  https://phabricator.wikimedia.org/T238404

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Dvorapa, Mpaa, Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, 
darthmon_wmde, Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, 
GoranSMilovanovic, QZanden, Tbscho, MayS, LawExplorer, Mdupont, JJMC89, 
_jensen, rosalieper, Altostratus, Avicennasis, Scott_WUaS, mys_721tx, 
Wikidata-bugs, aude, jayvdb, Dalba, Masti, Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T238404: Pywikibot fails when importing entity Q1410828

2019-11-15 Thread DD063520
DD063520 added a comment.


  yes, I did:
  
  pip install pywikibot
  
  and I checked, there the Wikipedia Family file does not contain "ban". Should 
I clone the repository?

TASK DETAIL
  https://phabricator.wikimedia.org/T238404

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Dvorapa, Mpaa, Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, 
darthmon_wmde, Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, 
GoranSMilovanovic, QZanden, Tbscho, MayS, LawExplorer, Mdupont, JJMC89, 
_jensen, rosalieper, Altostratus, Avicennasis, Scott_WUaS, mys_721tx, 
Wikidata-bugs, aude, jayvdb, Dalba, Masti, Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T238404: Pywikibot fails when importing entity Q1410828

2019-11-15 Thread DD063520
DD063520 added a comment.


  Mh, I use this version of Pywikibot: pywikibot-3.0.dev0
  could that be the problem?

TASK DETAIL
  https://phabricator.wikimedia.org/T238404

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Mpaa, Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, 
darthmon_wmde, Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, 
GoranSMilovanovic, QZanden, Tbscho, MayS, LawExplorer, Mdupont, JJMC89, 
Dvorapa, _jensen, rosalieper, Altostratus, Avicennasis, Scott_WUaS, mys_721tx, 
Wikidata-bugs, aude, jayvdb, Dalba, Masti, Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T238404: Pywikibot fails when importing entity Q1410828

2019-11-15 Thread DD063520
DD063520 created this task.
DD063520 added projects: Pywikibot, Wikidata.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  Steps to Reproduce:
  
  item = pywikibot.ItemPage(wikidata_repo, "Q1410828")
  item.get()
  
  Actual Results:
  
  File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", 
line 4541, in get
self.sitelinks[dbname] = self._content['sitelinks'][dbname]
  File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", 
line 6444, in __setitem__
val = SiteLink.fromJSON(val, self.repo)
  File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", 
line 6385, in fromJSON
sl = cls(data['title'], data['site'])
  File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", 
line 6329, in __init__
site, namespace, title = SiteLink._parse_namespace(title, site)
  File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", 
line 6353, in _parse_namespace
site = pywikibot.site.APISite.fromDBName(site)
  File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/site.py", 
line 1888, in fromDBName
return cls(lang, site['code'])
  File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/site.py", 
line 1840, in __init__
BaseSite.__init__(self, code, fam, user, sysop)
  File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/site.py", 
line 777, in __init__
% (self.__code, self.__family.name))
pywikibot.exceptions.UnknownSite: Language 'ban' does not exist in family 
wikipedia
CRITICAL: Exiting due to uncaught exception 
  
  Expected Results:
  
  I expect that the entity can be imported normally.
  
  The error message is quite clear, but for me it is not clear how to handle 
that case. How can I add 'ban' to the wikipedia family? Should it not be 
contained by default? Is there a way to synchronise the languages supported by 
wikidata and the one supported in the pywikibot?
  
  Thank you
  D063520

TASK DETAIL
  https://phabricator.wikimedia.org/T238404

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, darthmon_wmde, 
Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, 
Tbscho, MayS, LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, 
Altostratus, Avicennasis, Scott_WUaS, mys_721tx, Wikidata-bugs, aude, jayvdb, 
Dalba, Masti, Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T235500: Pywikibot cannot create new property

2019-11-14 Thread DD063520
DD063520 added a comment.


  @Xqt : hi, would you consider again this patch, currently I make this 
modification locally to have some code running

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Addshore, Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, Viztor, 
DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T236177: "The supplied language code was not recognized." when loading data from wikidata into wikibase

2019-10-29 Thread DD063520
DD063520 added a comment.


  When importing the sitelinks of Earth I get a similar problem:
  
  Language 'ban' does not exist in family wikipedia

TASK DETAIL
  https://phabricator.wikimedia.org/T236177

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Addshore, Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, 
darthmon_wmde, Jelabra, Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, 
GoranSMilovanovic, QZanden, Tbscho, MayS, LawExplorer, Mdupont, JJMC89, 
Dvorapa, _jensen, rosalieper, Altostratus, Avicennasis, Jonas, Asahiko, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Dalba, Lydia_Pintscher, 
Masti, Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T236177: "The supplied language code was not recognized." when loading data from wikidata into wikibase

2019-10-29 Thread DD063520
DD063520 added a comment.


  Hi,
  
  I reduced it down, apparently the language code that makes problems is:
  
  {"labels": { "nqo": {"language": "nqo", "value": "ߘߎ߱"}}}
  
  And this language code is not available in the options of wbsetlabel of my 
local wikibase.
  
  So this should be the source of the problem .

TASK DETAIL
  https://phabricator.wikimedia.org/T236177

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Addshore, Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, 
darthmon_wmde, Jelabra, Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, 
GoranSMilovanovic, QZanden, Tbscho, MayS, LawExplorer, Mdupont, JJMC89, 
Dvorapa, _jensen, rosalieper, Altostratus, Avicennasis, Jonas, Asahiko, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Dalba, Lydia_Pintscher, 
Masti, Alchimista, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T236177: wikibase-> importing entity from wikidata "The supplied language code was not recognized."

2019-10-23 Thread DD063520
DD063520 added a comment.


  This are the labels I'm trying to import:
  
  {'en': 'Earth', 'fr': 'Terre', 'uz': 'Yer', 'de': 'Erde', 'it': 'Terra', 
'pl': 'Ziemia', 'nb': 'jorda', 'eo': 'Tero', 'ru': 'Земля', 'es': 'Tierra', 
'be-tarask': 'Зямля', 'en-gb': 'Earth', 'ja': '地球', 'zh-hant': '地球', 'fi': 
'Maa', 'hr': 'Zemlja', 'pt': 'Terra', 'zh': '地球', 'gl': 'Terra', 'hu': 'Föld', 
'vo': 'tal', 'cs': 'Země', 'sk': 'Zem', 'uk': 'Земля', 'nn': 'jorda', 'ace': 
'Bumoë', 'af': 'Aarde', 'ang': 'Eorðe', 'an': 'Tierra', 'frp': 'Tèrra', 'ast': 
'Tierra', 'gn': 'Yvy', 'ay': 'Aka pacha', 'az': 'Yer', 'map-bms': 'Bumi', 
'bcl': 'Kinaban', 'bar': 'Eadn', 'bs': 'Zemlja', 'br': 'Douar', 'ca': 'Terra', 
'ceb': 'Kalibotan', 'cbk-zam': 'Tierra', 'cy': 'Y Ddaear', 'da': 'Jorden', 
'nv': 'Nahasdzáán', 'dsb': 'Zemja', 'et': 'Maa', 'eml': 'Tèra', 'ext': 
'Tierra', 'eu': 'Lurra', 'hif': 'Dunia', 'fo': 'Jørðin', 'fy': 'Ierde', 'fur': 
'Tiere', 'ga': 'An Domhan', 'gv': 'Yn Chruinney', 'gd': 'Saoghal', 'hak': 
'Thi-khiù', 'ha': 'Duniya', 'haw': 'Honua', 'hsb': 'Zemja', 'io': 'Tero', 'ig': 
'Àlà', 'ilo': 'Daga', 'id': 'Bumi', 'ia': 'Terra', 'is': 'Jörðin', 'jv': 
'bumi', 'kl': 'Nunarsuaq', 'pam': 'Yatu', 'csb': 'Zemia', 'kw': 'Dor', 'rw': 
'Isi', 'sw': 'Dunia', 'kg': 'Ntoto', 'ht': 'Latè', 'ku': 'Erd', 'lad': 
'Tierra', 'ltg': 'Zeme', 'la': 'Tellus', 'lv': 'Zeme', 'lb': 'Äerd', 'lt': 
'Žemė', 'lij': 'Tæra', 'li': 'Eerd', 'ln': 'Mabelé', 'jbo': 'la terdi', 'lmo': 
'Tera', 'mg': 'Tany', 'mt': 'Id-Dinja', 'ms': 'Bumi', 'szl': 'Źymja', 'cdo': 
'Dê-giù', 'mwl': 'Tierra', 'nah': 'Tlālticpactli', 'nl': 'Aarde', 'nds-nl': 
'Eerde', 'nap': 'Terra', 'frr': 'Jard', 'pih': 'Erth', 'nrm': 'Tèrre', 'nov': 
'Tere', 'oc': 'Tèrra', 'pfl': 'Erd', 'pap': 'Tera', 'pms': 'Tèra', 'tpi': 
'Giraun', 'nds': 'Eer', 'ksh': 'Ääd', 'ro': 'Pământ', 'rmy': 'Phuv', 'rm': 
'Terra', 'qu': 'Tiksimuyu', 'se': 'Eana', 'sc': 'Terra', 'sco': 'Yird', 'st': 
'Lefatshe', 'nso': 'Lefase', 'sq': 'Toka', 'scn': 'Terra', 'sl': 'Zemlja', 
'sh': 'Zemlja', 'su': 'Marcapada', 'sv': 'Jorden', 'tl': 'Daigdig', 'tr': 
'Dünya', 'za': 'Giuznamh', 'vec': 'Tera', 'vep': 'Ma', 'vi': 'Trái Đất', 'wa': 
'Daegne', 'vls': 'Eirde', 'war': 'Kalibutan', 'wo': 'Suuf', 'yo': 'àgbáyé', 
'diq': 'Dınya', 'zea': 'Aerde', 'ab': 'Адгьыл', 'am': 'መሬት', 'ar': 'الأرض', 
'arc': 'ܐܪܥܐ', 'arz': 'الارض', 'as': 'পৃথিৱী', 'be': 'Зямля', 'bg': 'Земя', 
'bn': 'পৃথিবী', 'bo': 'སའི་གོ་ལ།', 'chr': 'ᎡᎶᎯ', 'ckb': 'زەوی', 'cu': 'Ꙁємлꙗ', 
'cv': 'Çĕр', 'dv': 'ބިން', 'el': 'Γη', 'fa': 'زمین', 'gan': '地球', 'gu': 
'પૃથ્વી', 'he': 'כדור הארץ', 'hy': 'Երկիր', 'iu': 'ᓄᓇ', 'ka': 'დედამიწა', 'kk': 
'Жер', 'km': 'ផែនដី', 'kn': 'ಭೂಮಿ', 'ko': '지구', 'koi': 'Мушар', 'krc': 'Джер', 
'kv': 'Му', 'ky': 'Жер', 'lez': 'Чил', 'lo': 'ໂລກ', 'mdf': 'Мода', 'mhr': 
'Мланде', 'mk': 'Земја', 'ml': 'ഭൂമി', 'mn': 'Дэлхий', 'mr': 'पृथ्वी', 'my': 
'ကမ္ဘာဂြိုဟ်', 'myv': 'Мода', 'mzn': 'زمین', 'ne': 'पृथ्वी', 'new': 'पृथ्वी', 
'or': 'ପୃଥିବୀ', 'os': 'Зæхх', 'pa': 'ਧਰਤੀ', 'pnb': 'زمین', 'ps': 'ځمکه', 'rue': 
'Земля', 'sa': 'पृथ्वी', 'sah': 'Сир', 'si': 'මහ පොළොව', 'so': 'Dhulka', 'sr': 
'Земља', 'ta': 'புவி', 'te': 'భూమి', 'tg': 'Замин', 'th': 'โลก', 'tt': 'Җир', 
'ug': 'يەر شارى', 'ur': 'زمین', 'wuu': '地球', 'xal': 'Делкә һариг', 'xmf': 
'დიხაუჩა', 'yi': 'ערד-פלאנעט', 'en-ca': 'Earth', 'de-ch': 'Erde', 'pt-br': 
'Planeta Terra', 'yue': '地球', 'zh-cn': '地球', 'zh-hans': '地球', 'zh-sg': '地球', 
'zh-hk': '地球', 'zh-tw': '地球', 'zh-mo': '地球', 'gsw': 'Erde', 'pcd': 'Tière', 
'min': 'Bumi', 'sn': 'Rinopasi', 'tyv': 'Чер', 'tn': 'Lefatshe', 'bjn': 'Bumi', 
'sr-ec': 'Земља', 'sr-el': 'Zemlja', 'ba': 'Ер', 'bxr': 'Дэлхэй', 'ce': 
'Дуьне', 'stq': 'Äide', 'pag': 'Earth', 'got': 'Earth', 'crh-latn': 'Dünya', 
'sgs': 'Žemė', 'nan': 'Tē-kiû', 'lzh': '地球', 'vro': 'Maa', 'hi': 'पृथ्वी', 
'ie': 'Terra', 'tk': 'Ýer', 'ak': 'Ewiase', 'brh': 'dagaar', 'rup': 'Locu', 
'zu': 'Umhlaba', 'na': 'Eb', 'lzz': 'Kiana', 'mai': 'पृथ्वी', 'kaa': 'Jer', 
'av': 'Ракь', 'mrj': 'Мӱлӓндӹ', 'sd': 'زمين', 'lrc': 'جأهوٙن', 'tet': 'Rai', 
'azb': 'یئر', 'bho': 'पृथ्वी', 'kab': 'Tagnit', 'arq': 'أرض', 'ts': 'Misava', 
'de-at': 'Erde', 'sma': 'eatneme', 'ady': 'ЧIыгу', 'jam': 'Oert', 'tcy': 
'ಬೂಮಿ', 'ki': 'Thi', 'srn': 'Grontapu', 'gom': 'धर्तरी', 'tg-cyrl': 'Замин', 
'tt-cyrl': 'Җир', 'tt-latn': 'Cir', 'lfn': 'Tera', 'crh': 'Dünya', 'atj': 
'Aski', 'lg': 'Ensi', 'inh': 'Лаьтта', 'udm': 'Музъем', 'kbp': 'Tɛtʋ', 'dty': 
'पृथ्वी', 'mi': 'Whenua', 'co': 'Terra', 'sat': 'ᱫᱷᱟ.ᱨᱛᱤ', 'arn': 'Mapu', 
'shn': 'Earth', 'hyw': 'Երկիր', 'zh-my': '地球', 'nqo': 'ߘߎ߱'}
  
  Here the error
  {"error":{"code":"not-recognized-language","info":"The supplied language code 
was not 
recognized.","messages":[{"name":"wikibase-api-not-recognized-language","parameters":[],"html":{"*":"The
 supplied language code was not recognized."}}],"*":"See 
http://localhost:8181/w/api.php for API usage. Sub

[Pywikipedia-bugs] [Maniphest] [Retitled] T236177: wikibase-> importing entity from wikidata "The supplied language code was not recognized."

2019-10-22 Thread DD063520
DD063520 renamed this task from "wikibase, importing from wikidata: The 
supplied language code was not recognized." to "wikibase-> importing entity 
from wikidata  "The supplied language code was not recognized."".

TASK DETAIL
  https://phabricator.wikimedia.org/T236177

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, darthmon_wmde, Jelabra, 
Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, 
Tbscho, MayS, LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, 
Altostratus, Avicennasis, Asahiko, mys_721tx, Wikidata-bugs, aude, jayvdb, 
Dalba, Masti, Alchimista, Addshore, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T236177: wikibase, importing from wikidata: The supplied language code was not recognized.

2019-10-22 Thread DD063520
DD063520 created this task.
DD063520 added projects: Wikibase-Containers, Pywikibot, Wikidata.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  I'm importing into a fresh installation of a docker-wikibase and instance 
from Wikidata, namely Q2 (the earth). I'm using pywikibot to copy the labels 
from one base to the other. The problem is that when I import the labels I get:
  "The supplied language code was not recognized. "
  I can import most other entities without problem.
  
  My conclusion is that there is somehow a mismatch between the languages 
supported in a Wikibase and the once supported by Wikidata. Does this 
explanation makes sense? Does someone know how to synchronise that?
  
  Thank you
  D063520

TASK DETAIL
  https://phabricator.wikimedia.org/T236177

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, darthmon_wmde, Jelabra, 
Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, 
Tbscho, MayS, LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, 
Altostratus, Avicennasis, Asahiko, mys_721tx, Wikidata-bugs, aude, jayvdb, 
Dalba, Masti, Alchimista, Addshore, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T235500: Pywikibot cannot create new property

2019-10-22 Thread DD063520
DD063520 added a comment.


  Hello, could we push this change forward?

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, Jelabra, Viztor, 
DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, _jensen, Altostratus, 
Avicennasis, Asahiko, mys_721tx, Wikidata-bugs, jayvdb, Ricordisamoa, Dalba, 
Masti, Alchimista, Addshore, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T235500: Pywikibot cannot create new property

2019-10-17 Thread DD063520
DD063520 added a comment.


  The difference is the following  if you try to put in the wiki twice the 
same property:
  
wikibase_property =  pywikibot.PropertyPage(wikibase_repo, "P100", 
datatype='wikibase-item')
wikibase_property.get()
wikibase_property.editLabels(labels={'en': 'test123'}, summary='Setting 
labels')

wikibase_property =  pywikibot.PropertyPage(wikibase_repo, "P101", 
datatype='wikibase-item')
wikibase_property.get()
wikibase_property.editLabels(labels={'en': 'test123'}, summary='Setting 
labels')
  
  in the new case:
  
messages = None
if 'messages' in error:
messages = error['messages']
  
  the error contains the following information:
  
  failed-save: The save has failed. [messages:[{'name': 
'wikibase-api-failed-save', 'parameters': [], 'html': {'*': 'The save has 
failed.'}}, {'name': 'wikibase-validator-label-conflict', 'parameters': 
['test123', 'en', '[[Property:P100 
<https://phabricator.wikimedia.org/P100>|P100 
<https://phabricator.wikimedia.org/P100>]]'], 'html': {'*': 'Property https://phabricator.wikimedia.org/P100>" 
title="Property:P100 <https://phabricator.wikimedia.org/P100>">P100 
<https://phabricator.wikimedia.org/P100> already has label "test123" 
associated with language code en.'}}]; help:See http://localhost:8181/w/api.php 
for API usage. Subscribe to the mediawiki-api-announce mailing list at 
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce; for 
notice of API deprecations and breaking changes.]
  
  in the old case:
  
messages = error.pop('messages', None)
  
  the error says:
  
  failed-save: The save has failed. [help:See http://localhost:8181/w/api.php 
for API usage. Subscribe to the mediawiki-api-announce mailing list at 
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce; for 
notice of API deprecations and breaking changes.]
  
  So the message is removed!! 
  Without message it is difficult to understand what happens and the message 
contains the entity that is clashing!
  
  The reason is that .pop removes the key "messages" from error 
(https://www.programiz.com/python-programming/methods/list/pop) while the new 
implementation does not.

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, Jelabra, Viztor, 
DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, _jensen, Altostratus, 
Avicennasis, Asahiko, mys_721tx, Wikidata-bugs, jayvdb, Ricordisamoa, Dalba, 
Masti, Alchimista, Addshore, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T235500: Pywikibot cannot create new property

2019-10-16 Thread DD063520
DD063520 added a comment.


  I suggest to replace this line:
  
  
https://github.com/wikimedia/pywikibot/blob/26deab88936cbf85aa24e1ddfc9b62e81d80a9bb/pywikibot/data/api.py#L1615
  
  with:
  
messages = None
if 'messages' in error:
messages = error['messages']
#messages = error.pop('messages', None)

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, Jelabra, Viztor, 
DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, _jensen, Altostratus, 
Avicennasis, Asahiko, mys_721tx, Wikidata-bugs, jayvdb, Ricordisamoa, Dalba, 
Masti, Alchimista, Addshore, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T235500: Pywikibot cannot create new property

2019-10-16 Thread DD063520
DD063520 added a comment.


  Ok, to give back the error message to the user I propose the following change:
  
  if I modify these lines:
  
https://github.com/wikimedia/pywikibot/blob/26deab88936cbf85aa24e1ddfc9b62e81d80a9bb/pywikibot/data/api.py#L2040
  
  to
  
print("result2 ", result)
# Phab. tickets T48535, T64126, T68494, T68619
if code == 'failed-save' and \
   self.action == 'wbeditentity' and \
   self._is_wikibase_error_retryable(result['error']):
   self.wait()
   continue
print("result 3 ", result)
  
  I get:
  
result2  {'error': {'code': 'failed-save', 'info': 'The save has failed.', 
'messages': [{'name': 'wikibase-api-failed-save', 'parameters': [], 'html': 
{'*': 'The save has failed.'}}, {'name': 'wikibase-validator-label-conflict', 
'parameters': ['localisation administrative', 'fr', '[[Property:P27|P27]]'], 
'html': {'*': 'Property P27 already has label "localisation administrative" 
associated with language code fr.'}}, {'name': 
'wikibase-validator-label-conflict', 'parameters': ['located in the 
administrative territorial entity', 'en', '[[Property:P27|P27]]'], 'html': 
{'*': 'Property http://localhost:8181/w/api.php for API usage. Subscribe to the 
mediawiki-api-announce mailing list at 
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce; for 
notice of API deprecations and breaking changes.'}}
  
  So the message is eaten up. This happens in the 
self._is_wikibase_error_retryable function:
  
  
https://github.com/wikimedia/pywikibot/blob/26deab88936cbf85aa24e1ddfc9b62e81d80a9bb/pywikibot/data/api.py#L1615
  
  There a pop is used to retrieve the message which is then lost afterwords. 
Can someone fix this?

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, Jelabra, Viztor, 
DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, _jensen, Altostratus, 
Avicennasis, Asahiko, mys_721tx, Wikidata-bugs, jayvdb, Ricordisamoa, Dalba, 
Masti, Alchimista, Addshore, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T235500: Pywikibot cannot create new property

2019-10-16 Thread DD063520
DD063520 added a comment.


  Alternatively, is there an option to get the id of the existing Item/Property?

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, Jelabra, Viztor, 
DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, _jensen, Altostratus, 
Avicennasis, Asahiko, mys_721tx, Wikidata-bugs, jayvdb, Ricordisamoa, Dalba, 
Masti, Alchimista, Addshore, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T235500: Pywikibot cannot create new property

2019-10-16 Thread DD063520
DD063520 added a comment.


  A, I got it. The problem is that a property with this label is already 
existing. But the error message is really not clear. I only understood it after 
sending the same request over the API sandbox. Is there a way to ignore this 
check and create the property anyway?

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, Jelabra, Viztor, 
DannyS712, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, _jensen, Altostratus, 
Avicennasis, Asahiko, mys_721tx, Wikidata-bugs, jayvdb, Ricordisamoa, Dalba, 
Masti, Alchimista, Addshore, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T235500: Pywikibot cannot create new property

2019-10-15 Thread DD063520
DD063520 added a project: Wikibase-Containers.

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, darthmon_wmde, Jelabra, 
Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, 
Tbscho, MayS, LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, 
Altostratus, Avicennasis, Asahiko, mys_721tx, Wikidata-bugs, aude, jayvdb, 
Dalba, Masti, Alchimista, Addshore, Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Updated] T235500: Pywikibot cannot create new property

2019-10-15 Thread DD063520
DD063520 added a project: Wikidata.

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, darthmon_wmde, Viztor, 
DannyS712, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, 
MayS, LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, rosalieper, Altostratus, 
Avicennasis, mys_721tx, Wikidata-bugs, aude, jayvdb, Dalba, Masti, Alchimista, 
Mbch331, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Edited] T235500: Pywikibot cannot create new property

2019-10-15 Thread DD063520
DD063520 updated the task description.

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, Viztor, DannyS712, 
Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, 
mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T235500: Pywikibot cannot create new property

2019-10-15 Thread DD063520
DD063520 created this task.
DD063520 added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  Hello,
  
  I think this is not a bug, I guess I'm doing something wrong ...
  
  I want to create a new Property on a own Wikidata instance. Here is the code:
  
  1 wikibase_item = pywikibot.PropertyPage(wikibase_repo, 
datatype='wikibase-item')
  2 wikibase_item.editLabels(labels={'en': 'My new property'}, summary='Setting 
labels')
  3 print(wikibase_item)
  
  I can create entities without problems, but this fails at line 2 with
  
  WARNING: API error failed-save: The save has failed.
  Traceback (most recent call last):
File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", 
line 113, in handle
  func(self, *args, **kwargs)
File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", 
line 4259, in editEntity
  baserevid=baserevid, **kwargs)
File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/tools/__init__.py",
 line 1738, in wrapper
  return obj(*__args, **__kw)
File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/site.py", 
line 1322, in callee
  return fn(self, *args, **kwargs)
File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/site.py", 
line 7911, in editEntity
  data = req.submit()
File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/data/api.py",
 line 2079, in submit
  raise APIError(**result['error'])
  pywikibot.data.api.APIError: failed-save: The save has failed. [help:See 
http://localhost:8181/w/api.php for API usage. Subscribe to the 
mediawiki-api-announce mailing list at 
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce; for 
notice of API deprecations and breaking changes.]
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
  
File "/Users/Dennis/PycharmProjects/wikibaseEditor/main.py", line 26, in 

  wikibase_item.editLabels(labels={'en': 'My new property'}, 
summary='Setting labels')
File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", 
line 4279, in editLabels
  self.editEntity(data, **kwargs)
File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", 
line 134, in wrapper
  handle(func, self, *args, **kwargs)
File 
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py", 
line 126, in handle
  raise pywikibot.OtherPageSaveError(self, err)
  
  pywikibot.exceptions.OtherPageSaveError: Edit to page [[my:Property:-1]] 
failed:
  failed-save: The save has failed. [help:See http://localhost:8181/w/api.php 
for API usage. Subscribe to the mediawiki-api-announce mailing list at 
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce; for 
notice of API deprecations and breaking changes.]
  CRITICAL: Exiting due to uncaught exception 
  
  Do you have any clue? I have given the bot full rights, so it should not be 
that.
  
  Merci
  D063520

TASK DETAIL
  https://phabricator.wikimedia.org/T235500

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: DD063520
Cc: Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, Viztor, DannyS712, 
Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, 
mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs