-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates and Fixes for WikiBots #55
Conversation
We see errors from `wikibot-pipedrive` when run from cron due to the presence of unicode characters that don't match the default encoding for STDOUT, ASCII. Setting `PYTHONIOENCODING` ensures the encoding is set correctly.
With more recent versions of MediaWiki and the Auth_remoteuser plugin it seems this call to `site.login` generates an error which prevents access. This is unnecessary as the user is being identified by the HTTP authentication process.
df64568
to
b6c3d20
Compare
I've updated this PR to include some additional changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of comments is all :)
@@ -6,7 +6,7 @@ PATH=/usr/local/bin:/usr/bin:/bin | |||
PYTHON=/data/vhost/!!(*= $vhost *)!!/virtualenv-wiki/bin/python | |||
|
|||
24 5 * * * !!(*= $user *)!! $PYTHON /data/vhost/!!(*= $vhost *)!!/internal/wiki/bin/wikibot-fixup.py | |||
36 3 * * * !!(*= $user *)!! $PYTHON /data/vhost/!!(*= $vhost *)!!/internal/wiki/bin/wikibot-pipedrive.py | |||
36 3 * * * !!(*= $user *)!! export PYTHONIOENCODING=utf-8; $PYTHON /data/vhost/!!(*= $vhost *)!!/internal/wiki/bin/wikibot-pipedrive.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better solution would be to use python3 instead ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'll have a chat with @jacksonj04 about revisiting #40.
The `SignedJwtAssertionCredentials` class was deprecated and removed from `oauth2client` some considerable time ago. This change uses the replacement `ServiceAccountCredentials` construct.
Updated `requirements.txt` for the wiki that includes a newer version of the `oauth2client` package.
b6c3d20
to
de232b9
Compare
I'm going to merge this - this gets everything running then we can then work on the wider improvements in dedicated issues. |
The
SignedJwtAssertionCredentials
class was deprecated and removed fromoauth2client
some considerable time ago. This change uses the replacement and also updates the virtual environment's requirements file to reflect this.See also sysadmin#858.