Blahma created this task.
Blahma added projects: Pywikibot-core, Tool-Labs.
Herald added subscribers: pywikibot-bugs-list, Aklapper.
Herald added a project: Labs.

TASK DESCRIPTION

The pagefromfile.py Pywikibot script as installed on Tool Labs in /shared/pywikipedia/core/scripts/pagefromfile.py, possibly following the recent 673741f9832e commit, does not create a wiki page when it does not exist already. Instead, "No changes were needed on <page title>" is erroneously reported. This might be a general bug in Pywikibot, not linked just to Tool Labs where I experience this issue.

Steps to reproduce:

In a tool account, create a file called "test.txt" with the folowing content:

{{-start-}}
'''Wikipedista:Blahma/Pywikibot'''
Pywikibot pagefromfile test content
{{-stop-}}

The page Wikipedista:Blahma/Pywikibot does not exist on cs.wikipedia.org yet.
Then log in with Pywikibot and run the following command:

python /shared/pywikipedia/core/scripts/pagefromfile.py -lang:cs -file:test.txt

Result: "No changes were needed on [[Wikipedista:Blahma/Pywikibot]]" is shown
Expected: [[Wikipedista:Blahma/Pywikibot]] gets created with content from test.txt

Workaround: If I create the target page manually, e.g. by placing some dummy text and saving, and then run the same pagefromfile.py, the target page's content gets updated as expected.


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

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

To: Blahma
Cc: Aklapper, pywikibot-bugs-list, Blahma, MayS, Freddy2001, Mdupont, JJMC89, Luke081515, yuvipanda, Gryllida, jayvdb, scfc, Alchimista, coren, valhallasw, chasemp
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to