https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
Bug ID: 66687 Summary: SVN parse error Product: Pywikibot Version: compat (1.0) Hardware: PC OS: Windows 7 Status: NEW Severity: major Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: msh210@gmail.com Web browser: --- Mobile Platform: ---
C:...\pywikipedia\ua_bug.py:
import wikipedia print wikipedia.useragent
C:...\pywikipedia>python ua_bug.py Traceback (most recent call last): File "ua_bug.py", line 1, in <module> import wikipedia File "C:...\pywikipedia\wikipedia.py", line 6023, in < module> versionrev=(version.getversiondict()["rev"]) File "C:...\pywikipedia\pywikibot\version.py", line 50 , in getversiondict (tag, rev, date, hsh) = getversion_svn(_program_dir) File "C:...\pywikipedia\pywikibot\version.py", line 14 5, in getversion_svn dom = xml.dom.minidom.parse(resp) File "C:\Program Files\Python27\lib\xml\dom\minidom.py", line 1921, in parse return expatbuilder.parse(file) File "C:\Program Files\Python27\lib\xml\dom\expatbuilder.py", line 928, in par se result = builder.parseFile(file) File "C:\Program Files\Python27\lib\xml\dom\expatbuilder.py", line 207, in par seFile parser.Parse(buffer, 0) xml.parsers.expat.ExpatError: undefined entity: line 13, column 20
(I'm calling this bug "SVN parse error" on the advice of [[w:en:user:John Vandenberg]]. I don't know on what basis he so advised.)
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #1 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 140069 had a related patch set uploaded by John Vandenberg: (bug 66687) ExpatError obtaining version from SVN
https://gerrit.wikimedia.org/r/140069
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #2 from John Mark Vandenberg jayvdb@gmail.com --- The patch above only 'hides' the problem. It would be good if you could add a line
print rev
at line 139 to pywikibot/version.py , so it looks like this
print rev conn = httplib.HTTPSConnection('github.com')
and report what it prints out.
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #3 from msh210 msh210@gmail.com --- Does anyone have a workaround for me, please, so I can run scripts now and until this is fixed?
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #4 from msh210 msh210@gmail.com --- (In reply to John Mark Vandenberg from comment #2)
It would be good if you could add a line
print rev
at line 139 to pywikibot/version.py , so it looks like this
print rev conn = httplib.HTTPSConnection('github.com')
and report what it prints out.
If that was addressed to me and was assuming my state of affairs as it was I reported the bug (no change in software) -- neither of which I know to be the case -- then it prints out nothing.
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #5 from John Mark Vandenberg jayvdb@gmail.com --- Interesting.
(In reply to msh210 from comment #3)
Does anyone have a workaround for me, please, so I can run scripts now and until this is fixed?
Sure! This change should fix the problem:
https://gerrit.wikimedia.org/r/#/c/140069/1/pywikibot/version.py,cm
If that doesnt work, in wikipedia.py, line 6021, replace
setUserAgent(USER_AGENT_FORMAT % dict( script=('-'.join(version.get_executing_script())), versionrev=(version.getversiondict()["rev"]) ))
with
setUserAgent('Pywikibot 1.0/compat bug 66687')
(In reply to msh210 from comment #4)
.. If that was addressed to me and was assuming my state of affairs as it was I reported the bug (no change in software) -- neither of which I know to be the case -- then it prints out nothing.
Yes it was. I wasnt able to reproduce this problem on Linux, so I will need your help (or that of anyone else who can reproduce this bug) to find the problem.
Thanks for doing that. That helps me find the problem. I'll come back soon with another debugging request.
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #6 from msh210 msh210@gmail.com --- (In reply to John Mark Vandenberg from comment #5)
I'll come back soon with another debugging request.
By all means. Meanwhile, note that your two workarounds didn't work around; if it helps you to know the program output for either or both, lemme know.
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #7 from John Mark Vandenberg jayvdb@gmail.com --- I would appreciate knowing the program output from both workarounds.
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #8 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 140069 merged by jenkins-bot: (bug 66687) ExpatError obtaining version from SVN
https://gerrit.wikimedia.org/r/140069
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #9 from msh210 msh210@gmail.com --- (In reply to John Mark Vandenberg from comment #7)
I would appreciate knowing the program output from both workarounds.
(In reply to John Mark Vandenberg from comment #5)
This change should fix the problem:
https://gerrit.wikimedia.org/r/#/c/140069/1/pywikibot/version.py,cm
C:...\pywikipedia>python msh210.py Traceback (most recent call last): File "msh210.py", line 39, in <module> import catlib File "C:...\pywikipedia\catlib.py", line 20, in <module> import wikipedia as pywikibot File "C:...\pywikipedia\wikipedia.py", line 6023, in <module> versionrev=(version.getversiondict()["rev"]) File "C:...\pywikipedia\pywikibot\version.py", line 55, in getversiondict (tag, rev, date, hsh) = getversion_nightly() File "C:...\pywikipedia\pywikibot\version.py", line 202, in getversion_nightly data = open(os.path.join(wikipediatools.get_base_dir(), 'version')) NameError: global name 'wikipediatools' is not defined
(In further reply to John Mark Vandenberg from comment #5)
If that doesnt work, in wikipedia.py, line 6021, replace
setUserAgent(USER_AGENT_FORMAT % dict( script=('-'.join(version.get_executing_script())), versionrev=(version.getversiondict()["rev"]) ))
with
setUserAgent('Pywikibot 1.0/compat bug 66687')
C:...\pywikipedia>python msh210.py Traceback (most recent call last): File "msh210.py", line 39, in <module> import catlib File "C:...\pywikipedia\catlib.py", line 20, in <module> import wikipedia as pywikibot File "C:...\pywikipedia\wikipedia.py", line 9983, in <module> writeToCommandLogFile() File "C:...\pywikipedia\wikipedia.py", line 9782, in writeToCommandLogFile commandLogFile = codecs.open(commandLogFilename, 'w', 'utf-8') File "C:\Program Files\Python27\lib\codecs.py", line 881, in open file = __builtin__.open(filename, mode, buffering) IOError: [Errno 13] Permission denied: u'C:\...\pywikipedia\logs\commands.log'
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |66951
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |info@gno.de
--- Comment #10 from xqt info@gno.de --- wikipediatools bug is noted at bug 66951 and solved there
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #11 from msh210 msh210@gmail.com --- (In reply to xqt from comment #10)
wikipediatools bug is noted at bug 66951 and solved there
That bug is still marked patch_to_review and this one has now been marked resolved, which I don't understand. In any event, can someone clarify the resolvedness of this bug? Specifically: If I re-download the nightly compat, will I be able to run my scripts? If not, then how can I run them?
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687
--- Comment #12 from xqt info@gno.de --- It's not part of the nightly dump until the patch is committed after the review process. You may get the patched file from https://git.wikimedia.org/blob/pywikibot%2Fcompat/1f55aea336bda2349fdc73fe3e...
https://bugzilla.wikimedia.org/show_bug.cgi?id=66687 Bug 66687 depends on bug 66951, which changed state.
Bug 66951 Summary: version.py does no longer work with svn https://bugzilla.wikimedia.org/show_bug.cgi?id=66951
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
pywikipedia-bugs@lists.wikimedia.org