Last modified: 2014-07-21 09:31:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68330, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66330 - Running page_tests.py causes python to crash
Running page_tests.py causes python to crash
Status: RESOLVED WORKSFORME
Product: Pywikibot
Classification: Unclassified
documentation (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-07 19:56 UTC by Betacommand
Modified: 2014-07-21 09:31 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Betacommand 2014-06-07 19:56:44 UTC
Running tests/page_tests.py under windows causes python.exe to crash. Suspect it is due to having mwparserfromhell installed, but not being able to use the mwparserfromhell.parser.use_c which I manually have to set to false to ensure that python doesn't crash, will investigate and provide followup
Comment 1 Gerrit Notification Bot 2014-06-07 20:19:22 UTC
Change 138209 had a related patch set uploaded by Gerrit Patch Uploader:
fix pep8 error in the categoryFormat() and add check for mwparserfromhell usage on windows, and set parser.use_c = False if you can load mwpfh on windows. See bug 66330

https://gerrit.wikimedia.org/r/138209
Comment 2 Gerrit Notification Bot 2014-06-07 20:20:47 UTC
Change 138210 had a related patch set uploaded by Gerrit Patch Uploader:
fix pep8 error in the categoryFormat() and add check for mwparserfromhell usage on windows, and set parser.use_c = False if you can load mwpfh on windows. See bug 66330

https://gerrit.wikimedia.org/r/138210
Comment 3 Gerrit Notification Bot 2014-06-07 20:22:48 UTC
Change 138211 had a related patch set uploaded by Gerrit Patch Uploader:
fix pep8 error in the categoryFormat() and add check for mwparserfromhell usage on windows, and set parser.use_c = False if you can load mwpfh on windows. See bug 66330

https://gerrit.wikimedia.org/r/138211
Comment 4 Gerrit Notification Bot 2014-06-08 00:15:37 UTC
Change 138211 abandoned by John Vandenberg:
fix pep8 error in the categoryFormat() and add check for mwparserfromhell usage on windows, and set parser.use_c = False if you can load mwpfh on windows. See bug 66330

Reason:
Dup of Id1bafc078f924a4cc52bfe165b9639af9d4145d

https://gerrit.wikimedia.org/r/138211
Comment 5 John Mark Vandenberg 2014-06-08 08:36:49 UTC
Do all test case in tests/page_tests.py fail?  Can you attach a log of the unit test?

In the gerrit code review https://gerrit.wikimedia.org/r/#/c/138209/, it was explained that the issue upstream was closed without resolution:
https://github.com/earwig/mwparserfromhell/issues/54
Comment 6 Betacommand 2014-06-08 10:53:21 UTC
C:\rewrite>pwb.py tests\page_tests.py --v
testHashCmp (__main__.TestLinkObject) ... ok
testNamespaces (__main__.TestLinkObject)
Test that Link() normalizes namespace names ... ok
testTitles (__main__.TestLinkObject)
Test that Link() normalizes titles ... ok
testApiMethods (__main__.TestPageObject)
Test various methods that rely on API. ...


is all I get
Comment 7 xqt 2014-06-09 09:16:31 UTC
I am running on windows environment without mwpfh installed. It's result is:


c:\Pywikipedia\ssh\pywikibot\core>pwb.py tests/page_tests -v
testHashCmp (__main__.TestLinkObject) ... ok
testNamespaces (__main__.TestLinkObject)
Test that Link() normalizes namespace names ... ok
testTitles (__main__.TestLinkObject)
Test that Link() normalizes titles ... ok
testApiMethods (__main__.TestPageObject)
Test various methods that rely on API. ... ok
testGeneral (__main__.TestPageObject) ... ok
testIsCategory (__main__.TestPageObject)
Test isCategory method. ... ok
testIsDisambig (__main__.TestPageObject) ... ok
testIsImage (__main__.TestPageObject) ... ok
testIsRedirect (__main__.TestPageObject) ... ok
testIsTalkPage (__main__.TestPageObject)
Test isTalkPage() method. ... ok
testLinks (__main__.TestPageObject) ... ok
testNamespace (__main__.TestPageObject)
Test namespace() method ... ok
testPageGet (__main__.TestPageObject) ... ok
testReferences (__main__.TestPageObject) ... ok
testSection (__main__.TestPageObject)
Test section() method. ... ok
testSite (__main__.TestPageObject)
Test site() method ... ok
testTitle (__main__.TestPageObject)
Test title() method options. ... ok

----------------------------------------------------------------------
Ran 17 tests in 2.806s

OK

c:\Pywikipedia\ssh\pywikibot\core>

After cleaning the api-cache I got the same exept it needs some more time:

Ran 17 tests in 32.706s

OK
Comment 8 John Mark Vandenberg 2014-07-21 09:30:12 UTC
I have installed mwparserfromhell using pip, resulting in 0.3.3, and mwparserfromhell.parser.use_c being True by default.

When I run textlib_tests and page_tests, they run correctly on a 32bit system.

I suspect that there was a problem with the mwparserfromhell build, either upstream or a local build issue.

Recommend reinstalling again via pip, to be sure.

If the problem still exists, run the tests with full debug/verbose logging as shown in https://gerrit.wikimedia.org/r/#/c/146046/ , then remove the password from the log and upload it as an attachment to bugzilla, re-open the bug, and specify whether you have 64bit or 32bit machine.
Comment 9 Gerrit Notification Bot 2014-07-21 09:31:11 UTC
Change 138210 abandoned by John Vandenberg:
fix pep8 error in the categoryFormat() and add check for mwparserfromhell usage on windows, and set parser.use_c = False if you can load mwpfh on windows. See bug 66330

Reason:
Cant reproduce the problem, and if there is still a problem it needs to be fixed in mwparserfromhell.

https://gerrit.wikimedia.org/r/138210

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links