https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Bug ID: 61846 Summary: version.py crashes on tool labs Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: valhallasw@arctus.nl CC: russblau@hotmail.com Web browser: --- Mobile Platform: ---
Russell Blau 2014-02-24 02:45:56 CET This just leads to a new error:
/usr/lib/python2.7/subprocess.py in _execute_child(self=<subprocess.Popen object>, args=['git.cmd', '--no-pager', 'log', '-1', '--pretty=format:"%ad|%an|%h|%H|%d"--abbrev-commit', '--date=iso'], executable='git.cmd', preexec_fn=None, close_fds=False, cwd='/shared/pywikipedia/rewrite', env=None, universal_newlines=False, startupinfo=None, creationflags=0, shell=False, p2cread=None, p2cwrite=None, c2pread=8, c2pwrite=9, errread=None, errwrite=None) 1247 if fd is not None: 1248 os.close(fd) => 1249 raise child_exception 1250 1251 child_exception = OSError(2, 'No such file or directory')
<type 'exceptions.OSError'>: [Errno 2] No such file or directory args = (2, 'No such file or directory') child_traceback = 'Traceback (most recent call last):\n File "/usr/...st)\nOSError: [Errno 2] No such file or directory\n' errno = 2 filename = None message = '' strerror = 'No such file or directory'
Basically, getversiondict() needs to be able to fail gracefully and return some kind of placeholder value if it isn't able to locate either a GIT or SVN version number, rather than throw an exception and stop the entire framework from executing.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=61231
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #1 from Merlijn van Deen valhallasw@arctus.nl --- @Sorawee in Bug 61231: at the very least, it should fail gracefully (reporting a revision -1, for example). Not being able to determine the version should not break bots.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
--- Comment #2 from Merlijn van Deen valhallasw@arctus.nl --- https://gerrit.wikimedia.org/r/#/c/113185/ should fix this.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |kolega2357@gmail.com Version|core (2.0) |compat (1.0) Resolution|FIXED |---
--- Comment #3 from Merlijn van Deen valhallasw@arctus.nl --- This is still an issue for compat: > http://prntscr.com/34p865 (reported by Kolega2357 on IRC)
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #4 from Kolega2357 kolega2357@gmail.com --- Compat version is not work only on Windows 7 and Windows XP.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Amir Ladsgroup ladsgroup@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ladsgroup@gmail.com
--- Comment #5 from Amir Ladsgroup ladsgroup@gmail.com --- Can you give us a crash report? What you want to do and what happens
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #6 from Kolega2357 kolega2357@gmail.com --- Not working new version pywikipedia compat on Windows 7. Any script is not working on Windows 7.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #7 from Andre Klapper aklapper@wikimedia.org --- Stacktrace seems to be in the picture in comment 3
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #8 from Amir Ladsgroup ladsgroup@gmail.com --- oh, Okay, let me see what I can do
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Amir Ladsgroup ladsgroup@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |abshirdheere@hotmail.com
--- Comment #9 from Amir Ladsgroup ladsgroup@gmail.com --- *** Bug 63235 has been marked as a duplicate of this bug. ***
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #10 from Abshirdheere abshirdheere@hotmail.com --- https://gerrit.wikimedia.org/r/#/c/113185/3/pywikibot/version.py I followed the indication, but I still have another problem:
c:\pywikipedia>login.py Traceback (most recent call last): File "c:\pywikipedia\login.py", line 59, in <module> import query File "c:\pywikipedia\query.py", line 30, in <module> import wikipedia as pywikibot File "c:\pywikipedia\wikipedia.py", line 176, in <module> from pywikibot import version File "c:\pywikipedia\pywikibot\version.py", line 169 date = time.strptime(data.readline()[:19], '%Y-%m-%dT%H:%M:%S') ^ IndentationError: unexpected indent
c:\pywikipedia>
Can I get pywikipedia old version not compat
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #11 from Amir Ladsgroup ladsgroup@gmail.com --- Try this: http://tools.wmflabs.org/dexbot/compat.zip
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #12 from Kolega2357 kolega2357@gmail.com --- (In reply to Amir Ladsgroup from comment #11)
Yeah! this is work.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #13 from Abshirdheere abshirdheere@hotmail.com --- Amir Ladsgroup, it working and thanks
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Amir Ladsgroup ladsgroup@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |he7d3r@gmail.com
--- Comment #14 from Amir Ladsgroup ladsgroup@gmail.com --- *** Bug 63280 has been marked as a duplicate of this bug. ***
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Malafaya malafaya@clix.pt changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |malafaya@clix.pt
--- Comment #15 from Malafaya malafaya@clix.pt --- The problem is a "missing" entry to the Git bin directory in the PATH environment variable. I don't usually have it so I also get the error. Adding the path above fixes the problem.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #16 from Amir Ladsgroup ladsgroup@gmail.com --- no problem happens in line related to the subprocess of calling "git log" and since git is installed on Windows for almost everyone, check and see
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #17 from Malafaya malafaya@clix.pt --- I'm not sure what you mean. I'm not saying git is not installed. I mean it's not accessible just by invoking "git" without any path. The script is assuming git.exe is in the Windows PATH, which is not necessarily the case. Adding the git.exe directory to the PATH worked for me.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
--- Comment #18 from Malafaya malafaya@clix.pt --- P.S. I'm referring to the error "The system could not find the file specified", as posted by Kolega2357 above.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Amir Ladsgroup ladsgroup@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED
pywikipedia-bugs@lists.wikimedia.org