Seppl2013 added a comment.
It's 2019 and this isn't even mentioned in the documentation page yet.
TASK DETAIL
https://phabricator.wikimedia.org/T130570
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc: Seppl2013, Mika77, Aklapper
Seppl2013 added a comment.
https://www.mediawiki.org/wiki/Manual_talk:Pywikibot/Use_on_third-party_wikis
is inconsistent with this.
TASK DETAIL
https://phabricator.wikimedia.org/T195921
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Seppl2013 added a comment.
Ok I am continuing my search for the root directory in which to find
generate_family.py - at
https://www.mediawiki.org/wiki/Manual:Pywikibot/Scripts it's a red link ...
TASK DETAIL
https://phabricator.wikimedia.org/T234135
EMAIL PREFERENCES
https
Seppl2013 added a comment.
I tried:
register_family_file(family,
os.path.abspath(os.path.expanduser("~")+'/.pywikibot/families')+"/"+family+".py")
in
**user-config.py**
# -*- coding: utf-8 -*-
import os
family = 'royalfamily'
Seppl2013 added a comment.
thx for the comments. The actual problem is that the warnings do not make
sense. They refer to something independent like Global configuration variable
"mylang" and are therefor confusing for newbies. Yes
https://www.mediawiki.org/wiki/Manual
Seppl2013 added a comment.
I assume the
WARNING:
/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pywikibot/site.py:774:
UserWarning: Global configuration variable "mylang" changed to "royalfamily"
whil
Seppl2013 added a comment.
Indeed I get the same "no module named royalfamily" error as you do with:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import pywikibot # no need to import in user_config.py
from pywikibot import config2 # no need
Seppl2013 added a comment.
Sorry - the next issue is coming up:
WARNING:
/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pywikibot/family.py:71:
_NotImplementedWarning: royalfamily_family.__new__.__init__ is deprecated.
cls.instance.__init__
Seppl2013 added a comment.
# -*- coding: utf-8 -*-
from pywikibot import family
class Family(family.Family):
name = 'royalfamily'
langs = {
'en': 'royal-family.bitplan.com',
}
def scriptpath(self, code):
return
Seppl2013 added a comment.
@Dvorpa - i'd like to keep my passwords encrypted.
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013, pywikibot
Seppl2013 added a comment.
@Dvorpa - if you now how to handle the patch upload could you please do it
for me - i don't know how to create a patchfile from an RCS diff.
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings
Seppl2013 added a comment.
https://stackoverflow.com/questions/59254302/how-to-login-with-pywikibot-using-password-from-environment-variable/60882730#60882730
shows that others have the same need
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https
Seppl2013 added a comment.
Tried it and it does not work as advertised. pywikbot.api does not seem to
exist and:
from pywikibot.login import LoginManager
lm = LoginManager(password=self.getPassword(), site=self.site,
user=self.user)
lm.login()
the result is an error
Seppl2013 added a comment.
now my software is broken again and I need to repatch manually since pip
uninstall removed the RCS directory ...
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences
Seppl2013 added a comment.
https://pypi.org/project/pywikibot/ shows a build error ...
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013
Seppl2013 added a comment.
When i debug the code i end up in:
def getCookie(self):
"""
Login to the site.
@see: U{https://www.mediawiki.org/wiki/API:Login}
@return: cookie data if successful,
Seppl2013 added a comment.
It looks like site.py is gone now and code moved to site/__init__.py ... what
is the motivation for this inorthodox coding style?
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel
Seppl2013 added a comment.
I am trying to figure out how to create a patch file with
https://cocoon.apache.org/2.0/howto/howto-patch.html - the unified diff there
looks different than the rcsdiff patch above. What is needed for a proper patch
file?
TASK DETAIL
https
Seppl2013 added a comment.
https://test.pypi.org/project/py-3rdparty-mediawiki/0.0.2rc0/ has the latest
code that works with the patch.
https://github.com/WolfgangFahl/py-3rdparty-mediawiki/blob/master/wikibot/wikibot.py#L135
has your proposal but commented it since it breaks the tests
Seppl2013 added a comment.
How?
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido,
Viztor, Wenyi, Tbscho
Seppl2013 added a comment.
The new patch seems to be:
rcsdiff __init__.py
===
RCS file: RCS/__init__.py,v
retrieving revision 1.1
diff -r1.1 __init__.py
2026c2026
< def login(self, sysop=N
Seppl2013 added a comment.
From my point the proposed change is not a workaround. It's fine. The
encryption in this case was motivated to be MediaWiki-Japi compatible which
uses
https://github.com/WolfgangFahl/py-3rdparty-mediawiki/blob/master/wikibot/crypt.py
inspired by
https
Seppl2013 added a comment.
Could you please put a release on test.pypi.org so that I can install the
master with pip ...
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc: Dvorapa
Seppl2013 added a comment.
The patch seems to work for all 45 of my sites. It would be great if it would
make it into the release.
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc
Seppl2013 created this task.
Seppl2013 added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
To use pywikibot with a farm of wikis i try to set the login password via
software. I am getting the password from an encrypted source
Seppl2013 added a comment.
I am currently experimenting with this patch:
RCS file: RCS/site.py,v
retrieving revision 1.1
diff -r1.1 site.py
2017c2017
< def login(self, sysop=False, autocreate=False):
---
> def login(self, sysop=False, autocreate
Seppl2013 added a comment.
Very good. I think this task can be closed now.
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013, pywikibot-bugs
Seppl2013 added a comment.
Thx the data.api LoginManager works. How do i get rid of the warning:
WARNING: API warning (login): Main-account login via action=login is
deprecated and may stop working without warning. To continue login with
action=login, see [[Special:BotPasswords
Seppl2013 added a comment.
Again i had to do a patch to make sure the password is not forgot with two
lines:
login.py:
site.password=password
site.__init__.py:
self.password=None # in constructor
login_manager = api.LoginManager(site=self, user
Seppl2013 added a comment.
Thx for the offer. I am fine as long as i have a workaround ... no need to
hurry then.
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc: Dvorapa, Xqt
Seppl2013 added a comment.
Thx. There is a followup problem. When trying to login to a Mediawiki 1.33.2
system I get:
WARNING: API error readapidenied: You need read permission to use this
module.
WARNING: API error readapidenied: You need read permission to use this
module
Seppl2013 added a comment.
I suspect:
login_manager = api.LoginManager(site=self, user=self.username())
if login_manager.login(retry=True, autocreate=autocreate):
as the culprit .. here it might be that the existing password seems to be
forgotten again.
TASK DETAIL
Seppl2013 added a comment.
Sigh - this is like a catch 22 see how
https://phabricator.wikimedia.org/T248673 got closed while i am stuck with MW
1.27.3. So neither my old wiki nor my new wiki is useable in the process of
semi-automatic migration ...
TASK DETAIL
https
Seppl2013 added a comment.
Since it's only two lines it looks very awkward to learn a new tool chain for
this. WikiMedia still lives in its own development world so that it is hard for
outsiders to contribute effectivly.
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL
Seppl2013 added a comment.
I am preparing a new python package at
https://github.com/WolfgangFahl/py-3rdparty-mediawiki and would love to
concentrate on this. This new package will depend on the patch above.
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https
Seppl2013 added a comment.
I have tried today with pywikibot>=3.0.20200508 and on my local machine the
tests run. I am having some trouble in the travis environment of a project I
am using things now - I'll create a separate issue for that.
TASK DETAIL
https://phabricator.wikimedia.
Seppl2013 added a comment.
Looks like this is a general pip problem with transitive dependencies. The
pycrypto library is also explcitly mentioned in the requirements.txt file for
py-3rdparty-mediawiki. I'll try to release that library on pypi to see if that
fixes the issue.
TASK DETAIL
Seppl2013 added a comment.
see https://pypi.org/project/py-3rdparty-mediawiki/0.0.2/
TASK DETAIL
https://phabricator.wikimedia.org/T253378
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc: pywikibot-bugs-list, Aklapper, Seppl2013
Seppl2013 created this task.
Seppl2013 added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
The SemanticMediaWiki extension has it's own Mediawiki API extensions see
https://www.semantic-mediawiki.org/wiki/Help:API
I'd like
Seppl2013 updated the task description.
TASK DETAIL
https://phabricator.wikimedia.org/T254003
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc: Aklapper, Seppl2013, pywikibot-bugs-list, JohnsonLee01, Dijkstra, Zkhalido,
Viztor, Wenyi
Seppl2013 added a comment.
@Xqt - thanks for looking into this. I am currently adding this to
https://github.com/WolfgangFahl/py-3rdparty-mediawiki/issues/1 with
https://github.com/WolfgangFahl/py-3rdparty-mediawiki/blob/master/wikibot/smw.py
where I am happily using a standard Request
Seppl2013 added a comment.
You trial was obviously on Windows and not Ubuntu 18.04 LTS
TASK DETAIL
https://phabricator.wikimedia.org/T171886
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: valhallasw, Seppl2013
Cc: JJMC89, matej_suchanek
Seppl2013 added a comment.
Please reopen this issue - marking it invalid since it's not reproducible in
the Wikimedia Universe is not helpful for those having the problem in their own
environment .
TASK DETAIL
https://phabricator.wikimedia.org/T171886
EMAIL PREFERENCES
https
Seppl2013 added a comment.
Seems to happen again e.g. pip3 install --no-cache-dir -I
pywikibot==3.0.20200508
Collecting pywikibot==3.0.20200508
Downloading
https://files.pythonhosted.org/packages/42/3d/ecfce167ec6b29726d043ec324daf29e48b094c37319a7b193bbd9e40610/pywikibot
Seppl2013 reopened this task as "Open".
TASK DETAIL
https://phabricator.wikimedia.org/T171886
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: valhallasw, Seppl2013
Cc: Seppl2013, valhallasw, zhuyifei1999, Framawiki, pywikibot-bugs-list,
Seppl2013 added a comment.
It was a bit frustrating.
https://pypi.org/project/pywikibot/
===
pywikibot==3.0.20200306
in requirements.txt works all more recent versions fail on Ubuntu 18.04 LTS
with python 3.6 and 3.7.5. I tried lots
Seppl2013 added a comment.
The https://pypi.org/project/py-3rdparty-mediawiki/ support now works quite
nicely to handle the SMW API. This task can IMHO be closed.
TASK DETAIL
https://phabricator.wikimedia.org/T254003
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel
Seppl2013 added a comment.
https://github.com/WolfgangFahl/py-3rdparty-mediawiki/blob/master/wikibot/smw.py#L137
from pywikibot.data.api import Request
...
def submit(self, parameters):
""" submit the request with the given parameters
Seppl2013 created this task.
Seppl2013 added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Danmichaelo,
Aklapper.
TASK DESCRIPTION
**Current behavior:**
When using pywikibot in an import statement the check for user-config.py is
immediately done
Seppl2013 added a comment.
looks great. How do i get rid of the "family and mylang ar not set ..."
messages?
TASK DETAIL
https://phabricator.wikimedia.org/T270474
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt, Seppl2013
Cc: Fe
Seppl2013 added a comment.
https://github.com/WolfgangFahl/py-3rdparty-mediawiki/issues/35 will have to
wait for the release on pypi see https://pypi.org/project/pywikibot/
TASK DETAIL
https://phabricator.wikimedia.org/T270474
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings
Seppl2013 added a comment.
What is the proper procedure to tell pywikibot the password for login via API
? I am using
python
# needs patch as outlined in https://phabricator.wikimedia.org/T248471
#self.site.login(password=self.getPassword())
lm
Seppl2013 created this task.
Seppl2013 added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
as outlined in T248471 <https://phabricator.wikimedia.org/T248471> the code
# needs patch as outlined in
Seppl2013 added a comment.
If checking the version is the issue please allow to specify the version via
API instead of trying to find out via API before being logged in ...
TASK DETAIL
https://phabricator.wikimedia.org/T266935
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings
Seppl2013 added a comment.
With pywikibot 5.0.0 i have to start all over again ... sigh ..
TASK DETAIL
https://phabricator.wikimedia.org/T248471
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Seppl2013
Cc: Dvorapa, Xqt, Mpaa, Aklapper, Seppl2013
Seppl2013 added a comment.
There is a
WARNING: API error readapidenied: You need read permission to use this
module.
warning with no details on what the API called is. When debugging it reveals
that a meta=siteinfo is tried and if that fails a login is performed. This
doesn't
Seppl2013 added a comment.
If you try to debug the situation and click on "site" in the loginmanager a
sequence of API call is initiated ... that makes it even harder to find out
what is going on ...
TASK DETAIL
https://phabricator.wikimedia.org/T266935
EMAIL PREFERENC
Seppl2013 added a comment.
One of the issues seems to be that I don't know how to get rid of the "You
need read permission to use this module." messsage on MediaWiki1.35 so that
things would at least work for my public wikis.
bash
curl -s
"http://test.bitplan.com
Seppl2013 added a subscriber: Xqt.
Seppl2013 added a comment.
@Xqt - thanks for trying again. I still have some project based on pywikibot
although I am trying to avoid it and use mwclient more these days due to this
limited useability in intranet situations.
TASK DETAIL
https
Seppl2013 added a comment.
@Xqt - thx for the reply and asking - i am fine with this schedule - thank
you very much.
TASK DETAIL
https://phabricator.wikimedia.org/T278076
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt, Seppl2013
Cc
Seppl2013 added a comment.
I am happy with my workaround for the time being. I also intend to change my
app to a webbased app and use py2app to create an app that only communicates
with the webbased app. That way i'll avoid any similar problems. Still to fix
things upstream the default
Seppl2013 added a comment.
looks like avoiding the exception
TASK DETAIL
https://phabricator.wikimedia.org/T278076
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt, Seppl2013
Cc: valhallasw, Xqt, pywikibot-bugs-list, Aklapper, Seppl2013
Seppl2013 added a comment.
Thx. for the explanation. And no - testing the script just now with just the
config2.py changed will be tough since the three CI pipelines i am using are
all pulling directly from PyPi. For my local environment it would be sort of
feasible but i fear
Seppl2013 added a comment.
If you then do a
import pywikibot
This will already activate some code which might fail. Even if you do
import os
os.environ["PYWIKIBOT_NO_USER_CONFIG"]="2"
you might end up with an exception. Since code I
Seppl2013 added a comment.
see
https://github.com/WolfgangFahl/py-3rdparty-mediawiki/commit/8ab0bd846d191fa93cfd661c89e2bc769d69f06b
for trying this workaround
TASK DETAIL
https://phabricator.wikimedia.org/T278076
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel
Seppl2013 added a comment.
@Xqt https://github.com/WolfgangFahl/py-3rdparty-mediawiki/issues/43 has the
issue about pycrypto...
Which sample are you talking about? How could i get a traceback if i only try
an import without catching the Exception. I am in the process of adding
try
Seppl2013 added a comment.
The sample
% python
Python 3.8.8 (default, Mar 18 2021, 06:01:57)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from
67 matches
Mail list logo