saper added a subscriber: saper.
saper added a comment.
I have this problem again, WindowsError when running in UNIX from cron (git is not on $PATH):
Traceback (most recent call last):
File "/home/saper/wikipedia/src/meta/kursy/tabelac.py", line 8, in <module>
import wikipedia
File "/home/saper/wikipedia/compat/wikipedia.py", line 6062, in <module>
versionrev=(version.getversiondict()["rev"])
File "/home/saper/wikipedia/compat/pywikibot/version.py", line 70, in getversiondict
(tag, rev, date, hsh) = getversion_git(_program_dir)
File "/home/saper/wikipedia/compat/pywikibot/version.py", line 181, in getversion_git
except WindowsError:
NameError: global name 'WindowsError' is not defined
TASK DETAIL
https://phabricator.wikimedia.org/T63231
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: saper
Cc: saper, Xqt, Nullzero, valhallasw, jayvdb, pywikipedia-bugs
Imamadmad created this task.
Imamadmad added a subscriber: Imamadmad.
Imamadmad added projects: Pywikibot-login.py, pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
I'm trying to create a bot and log in for the first time. I've generated the family and user files, and then navigated to the pywikibot folder to access login.py, but I keep getting an error message as follows:
```
Don'tNeedToKnow@Imamadmad /cygdrive/c/core/pywikibot
$ python login.py
Traceback (most recent call last):
File "login.py", line 20, in <module>
import pywikibot
ImportError: No module named pywikibot
```
I haven't touched any files at all apart from running generate_family_file.py and generate_user_files.py. The version of pywikibot is the one from http://tools.wmflabs.org/pywikibot/ last updated on May 4th, but this has been happening for almost a week now. It was about a week ago that I first tried installing the software. I don't know what exactly the problem is. The above error message is all I've got. I can post further if there are more things you can tell me to do to expose the cause of the problem.
To give full list of what files are available and where, from where they've been placed by default:
```
Don'tNeedToKnow@Imamadmad /cygdrive/c/core
$ ls
ChangeLog logs setup.py
CREDITS pwb.py tests
externals pywikibot tox.ini
ez_setup.py README.rst user-config.py
generate_family_file.py README-conversion.txt user-config.py.sample
generate_user_files.py requirements.txt
LICENSE scripts
Don'tNeedToKnow@Imamadmad /cygdrive/c/core
$ cd pywikibot
Don'tNeedToKnow@Imamadmad /cygdrive/c/core/pywikibot
$ ls
__init__.py config2.pyc exceptions.pyc login.pyc throttle.py
__init__.pyc data families page.py throttle.pyc
backports.py date.py family.py page.pyc titletranslate.py
backports.pyc diff.py family.pyc pagegenerators.py tools
bot.py diff.pyc fixes.py plural.py userinterfaces
bot.pyc echo.py i18n.py plural.pyc version
botirc.py echo.pyc i18n.pyc site.py version.py
comms editor.py interwiki_graph.py site.pyc version.pyc
compat epydoc.cfg logentries.py textlib.py weblib.py
config2.py exceptions.py login.py textlib.pyc xmlreader.py
```
TASK DETAIL
https://phabricator.wikimedia.org/T97992
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Imamadmad
Cc: pywikipedia-bugs, Imamadmad, Aklapper, jayvdb
Xqt created this task.
Xqt added a subscriber: Xqt.
Xqt added a project: Pywikibot-i18n.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
'category-renamed': u'Bot: Moved from %s. Authors: %s',
should be changes to
'category-renamed': u'Bot: Moved from %(from)s. Authors: %(authors)s',
or similar for use with a dict like all the other messages
TASK DETAIL
https://phabricator.wikimedia.org/T98004
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: pywikipedia-bugs, Xqt, Aklapper
jayvdb created this task.
jayvdb claimed this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
The appveyor builds take forever to complete because they spawn a process and do not kill it.
TASK DETAIL
https://phabricator.wikimedia.org/T97913
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: pywikipedia-bugs, jayvdb, Aklapper
Xqt created this task.
Xqt added a subscriber: Xqt.
Xqt added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
```
Traceback (most recent call last):
File "C:\pwb\core\pwb.py", line 228, in <module>
run_python_file(filename, argv, argvu, file_package)
File "C:\pwb\core\pwb.py", line 85, in run_python_file
main_mod.__dict__)
File ".\scripts\replace.py", line 947, in <module>
main()
File ".\scripts\replace.py", line 938, in main
bot.run()
File ".\scripts\replace.py", line 640, in run
page.put(new_text, self.generate_summary(applied), callback=self.count_changes)
File "C:\pwb\core\pywikibot\tools\__init__.py", line 952, in wrapper
return obj(*__args, **__kw)
File "C:\pwb\core\pywikibot\page.py", line 1126, in put
**kwargs)
File "C:\pwb\core\pywikibot\tools\__init__.py", line 952, in wrapper
return obj(*__args, **__kw)
File "C:\pwb\core\pywikibot\page.py", line 1042, in save
**kwargs)
File "C:\pwb\core\pywikibot\page.py", line 1050, in _save
summary = self._cosmetic_changes_hook(summary) or summary
File "C:\pwb\core\pywikibot\page.py", line 1102, in _cosmetic_changes_hook
self.text = ccToolkit.change(old)
File "C:\pwb\core\scripts\cosmetic_changes.py", line 296, in change
new_text = self._change(text)
File "C:\pwb\core\scripts\cosmetic_changes.py", line 290, in _change
text = self.safe_execute(method, text)
File "C:\pwb\core\scripts\cosmetic_changes.py", line 277, in safe_execute
result = method(text)
File "C:\pwb\core\scripts\cosmetic_changes.py", line 618, in cleanUpLinks
'startspace'])
File "C:\pwb\core\pywikibot\textlib.py", line 243, in replaceExcept
replacement = new(match)
File "C:\pwb\core\scripts\cosmetic_changes.py", line 513, in handleOneLink
namespace = page.namespace()
File "C:\pwb\core\pywikibot\page.py", line 167, in namespace
return self._link.namespace
File "C:\pwb\core\pywikibot\page.py", line 4604, in namespace
self.parse()
File "C:\pwb\core\pywikibot\page.py", line 4508, in parse
self._text, self._site, prefix))
pywikibot.exceptions.SiteDefinitionError: DOI:10.1080/14672710601073010 is not a
local page on wikipedia:de, and the interwiki prefix doi is not supported by PyWikiBot!
<class 'pywikibot.exceptions.SiteDefinitionError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
```
TASK DETAIL
https://phabricator.wikimedia.org/T97932
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: pywikipedia-bugs, Xqt, Aklapper, jayvdb