Page MenuHomePhabricator

New pages are not being created by
Closed, ResolvedPublic


The Pywikibot script as installed on Tool Labs in /shared/pywikipedia/core/scripts/, 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:

Pywikibot pagefromfile test content

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

python /shared/pywikipedia/core/scripts/ -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, the target page's content gets updated as expected.

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript
Xqt triaged this task as Medium priority.

Change 315095 had a related patch set uploaded (by Xqt):
[bugfix] reset the page.text content

I applied the patch and it worked for me.

Thank you very much for acting up on my report so swiftly!
The patch is apparently not yet live on Tool Labs, but hopefully will soon be.

Change 315095 merged by jenkins-bot:
[bugfix] reset the page.text content