Last modified: 2014-04-20 23:48:03 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 T63846, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61846 - version.py crashes on tool labs
version.py crashes on tool labs
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
compat-(1.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
: 63235 63280 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-24 10:19 UTC by Merlijn van Deen (test)
Modified: 2014-04-20 23:48 UTC (History)
10 users (show)

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


Attachments

Description Merlijn van Deen (test) 2014-02-24 10:19:25 UTC
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.
Comment 1 Merlijn van Deen (test) 2014-02-24 10:20:49 UTC
@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.
Comment 2 Merlijn van Deen (test) 2014-02-24 19:39:07 UTC
https://gerrit.wikimedia.org/r/#/c/113185/ should fix this.
Comment 3 Merlijn van Deen (test) 2014-03-27 22:43:23 UTC
This is still an issue for compat: > http://prntscr.com/34p865  (reported by Kolega2357 on IRC)
Comment 4 Kolega2357 2014-03-27 23:02:49 UTC
Compat version is not work only on Windows 7 and Windows XP.
Comment 5 Amir Ladsgroup 2014-03-28 07:16:56 UTC
Can you give us a crash report? What you want to do and what happens
Comment 6 Kolega2357 2014-03-28 11:58:30 UTC
Not working new version pywikipedia compat on Windows 7. Any script is not working on Windows 7.
Comment 7 Andre Klapper 2014-03-28 12:42:43 UTC
Stacktrace seems to be in the picture in comment 3
Comment 8 Amir Ladsgroup 2014-03-28 12:53:06 UTC
oh, Okay, let me see what I can do
Comment 9 Amir Ladsgroup 2014-03-28 23:23:35 UTC
*** Bug 63235 has been marked as a duplicate of this bug. ***
Comment 10 Abshirdheere 2014-03-29 20:58:15 UTC
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
Comment 11 Amir Ladsgroup 2014-03-30 09:11:04 UTC
Try this:
http://tools.wmflabs.org/dexbot/compat.zip
Comment 12 Kolega2357 2014-03-30 09:45:46 UTC
(In reply to Amir Ladsgroup from comment #11)
> Try this:
> http://tools.wmflabs.org/dexbot/compat.zip

Yeah! this is work.
Comment 13 Abshirdheere 2014-03-30 14:06:09 UTC
Amir Ladsgroup, it working and thanks
Comment 14 Amir Ladsgroup 2014-03-30 19:40:57 UTC
*** Bug 63280 has been marked as a duplicate of this bug. ***
Comment 15 Malafaya 2014-04-01 15:02:51 UTC
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.
Comment 16 Amir Ladsgroup 2014-04-01 15:25:51 UTC
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
Comment 17 Malafaya 2014-04-02 09:03:54 UTC
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.
Comment 18 Malafaya 2014-04-02 09:06:14 UTC
P.S. I'm referring to the error "The system could not find the file specified", as posted by Kolega2357 above.

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


Navigation
Links