[Pywikipedia-bugs] [Maniphest] [Commented On] T142021: Error mysqlquery

2016-08-03 Thread Vladis13
Vladis13 added a comment.
I wanted list pages that transcludes a template, for use in an autonomous script. 
Now command "python scripts\listpages.py -transcludes" seems works. Perhaps something reinstalled at tries above. 
I will try get the list by call "import os ; os.system(command)", although I wanted using function of pwb-framework.TASK DETAILhttps://phabricator.wikimedia.org/T142021EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Vladis13Cc: Mpaa, valhallasw, Aklapper, pywikibot-bugs-list, Vladis13, Mdupont, jayvdb___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T142021: Error mysqlquery

2016-08-03 Thread Vladis13
Vladis13 added a comment.
Turns out, oursql has a branch for Python 3. But

pip install oursql3

give error too: "utf-8' codec can't decode byte 0xcd in position 20: invalid continuation byte".TASK DETAILhttps://phabricator.wikimedia.org/T142021EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Vladis13Cc: Mpaa, valhallasw, Aklapper, pywikibot-bugs-list, Vladis13, Mdupont, jayvdb___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T142021: Error mysqlquery

2016-08-03 Thread Mpaa
Mpaa added a comment.
pip install MySQL-python ?TASK DETAILhttps://phabricator.wikimedia.org/T142021EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: MpaaCc: Mpaa, valhallasw, Aklapper, pywikibot-bugs-list, Vladis13, Mdupont, jayvdb___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T142021: Error mysqlquery

2016-08-03 Thread Vladis13
Vladis13 added a comment.

"pip install oursql" occurs errors too.  Oursql is critical outdated from 2012. On install it breaks on old format command "print " and something problem with Visual Studio. Also it require install "cython".
"pip install python-mysql" occurs error:


Could not find a version that satisfies the requirement python-mysql (from versions: )
No matching distribution found for python-mysql


I tried other mysql-connectors,
User:Legoktm/wmflib that recommend on Help:Tool Labs/Database is only for python 2.
All commons mysql-connectors  for python old versions too.
Official MySQL is max for python 3.4.



I tried just connect to DB-replica with edited the script User:Legoktm/wmflib, but Tool Labs require SSH connect. The script get only 1 host/user/password, but need connect with SSH-server, then with DB. I don't understand how do it.TASK DETAILhttps://phabricator.wikimedia.org/T142021EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Vladis13Cc: valhallasw, Aklapper, pywikibot-bugs-list, Vladis13, Mdupont, jayvdb___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T142021: Error mysqlquery

2016-08-03 Thread valhallasw
valhallasw added a comment.
pip install oursql python-mysql should install the required packages.TASK DETAILhttps://phabricator.wikimedia.org/T142021EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: valhallaswCc: valhallasw, Aklapper, pywikibot-bugs-list, Vladis13, Mdupont, jayvdb___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Edited] T142021: Error mysqlquery

2016-08-03 Thread Vladis13
Vladis13 edited the task description. (Show Details)
EDIT DETAILS...E.g.  //python scripts\listpages.py -mysqlquery:"py -mysqlquery:"SELECT * FROM page LIMIT 10"//
or //list = pywikibot.pagegenerators.MySQLPageGenerator('SELECT * FROM page LIMIT 10"10')//...TASK DETAILhttps://phabricator.wikimedia.org/T142021EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Vladis13Cc: Aklapper, pywikibot-bugs-list, Vladis13, Mdupont, jayvdb___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Created] T142021: Error mysqlquery

2016-08-03 Thread Vladis13
Vladis13 created this task.Vladis13 added a project: Pywikibot-core.Herald added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTIONWhen run listpages.py -mysqlquery (or call function pagegenerators.py) occurs error that not found modules "oursql" and "MySQLdb". These files no in pwb and python packages.

E.g.  python scripts\listpages.py -mysqlquery:"SELECT * FROM page LIMIT 10"

Traceback (most recent call last):
  File "c:\python35\lib\site-packages\pywikibot-2.0rc3-py3.5.egg\pywikibot\pagegenerators.py", line 2210, in MySQLPageGenerator
import oursql as mysqldb
ImportError: No module named 'oursql'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
...
  File "c:\python35\lib\site-packages\pywikibot-2.0rc3-py3.5.egg\pywikibot\pagegenerators.py", line 2212, in MySQLPageGenerator
import MySQLdb as mysqldb
ImportError: No module named 'MySQLdb'
TASK DETAILhttps://phabricator.wikimedia.org/T142021EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Vladis13Cc: Aklapper, pywikibot-bugs-list, Vladis13, Mdupont, jayvdb___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Edited] T59027: support Wikidata in commons_link.py

2016-08-03 Thread dachary
dachary edited the task description. (Show Details)Herald added a subscriber: Avicennasis.
EDIT DETAILS...For many pages is this value stored on wikidata, so bot should look at first to corresponding item on wikidata (P373 = commonscat, P935 = commons). When there is not, look for category/gallery on commons...TASK DETAILhttps://phabricator.wikimedia.org/T59027EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: dacharyCc: Avicennasis, Aklapper, Steinsplitter, JAnD, jayvdb, Ricordisamoa, pywikibot-bugs-list___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs