Page MenuHomePhabricator

version.getversion_git() fails
Closed, ResolvedPublic

Description

C:Volega2357>python category.py -family:wikipedia -lang:sh -pt:0 move
Traceback (most recent call last):
  File "category.py", line 106, in <module>
    import wikipedia as pywikibot
  File "C:\Kolega2357\wikipedia.py" line 6062, in <module>
    versionrev=(version.getversiondict()["rev"])
  File "C:\Kolega2357\pywikibot\version.py" line 70, in getversiondict
    (tag, rev, date, hsh) = getversion_git(_program_dir)
  File "C:\Kolega2357\pywikibot\version.py" line 188, in getversion_git
    hsh = open(os.path.join(_program_dir, '.git/refs/heads/master'), 'r').read().strip(" \n")
I0Error: [Errno 2] No such file or directory: 'CAVolega2357\\.git/refs/heads/master'

(ocr'ed from http://prntscr.com/6dwrdv)

Event Timeline

Xqt raised the priority of this task from to Needs Triage.
Xqt updated the task description. (Show Details)
Xqt added a project: Pywikibot-compat.
Xqt added a subscriber: Xqt.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptMar 7 2015, 8:35 PM
Xqt triaged this task as High priority.Mar 7 2015, 8:37 PM
Xqt added a subscriber: Kolega2357.
XZise set Security to None.
XZise updated the task description. (Show Details)

I wrote that parts, I will work on it.

Change 203305 had a related patch set uploaded (by Ladsgroup):
Returns unknown version when git repo is cleaned, instead of crashing

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

Change 203305 merged by jenkins-bot:
Returns unknown version when git repo is cleaned, instead of crashing

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

Feel free to reopen it if it persists.