Vladis13 created this task.
Vladis13 added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  The database queries in my bots, based on Pywikibot, crashes after the March 
changes (renamed the database replica 
<https://wikitech.wikimedia.org/w/index.php?title=Help:Toolforge/Database&diff=1905017&oldid=1903282>
 T278252 <https://phabricator.wikimedia.org/T278252> and a few changes in 
Pywikibot like 
<https://github.com/wikimedia/pywikibot/commit/6a52075597c93f6720cff0401214778aa2a2625f>).
  From my PC (via SSH tunnel 
<https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#Connecting_to_the_database_replicas_from_your_own_computer>)
 scripts work, but not on toolforge.org server.
  
  To example, I run `python` promt on the server:
  
    >>> from pywikibot.data import mysql
    
    >>> sql = "SELECT * FROM page LIMIT 10;"
    >>> result = mysql.mysql_query(sql, dbname='ruwiki')
    >>> list(result)
    
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/data/project/shared/pywikipedia/core/pywikibot/data/mysql.py", 
line 67, in mysql_query
        with connection as conn, conn.cursor() as cursor:
    AttributeError: 'Cursor' object has no attribute 'cursor'
  
  
  
    >>> from pywikibot import config2 as config
    
    >>> config.db_hostname_format.format(dbname)
    'ruwiki.web.db.svc.wikimedia.cloud'
    
    >>> config.db_name_format.format(dbname)
    'ruwiki_p'
    
    >>> config.db_port
    3306
    
    >>> credentials
    {'read_default_file': '/data/project/vltools/replica.my.cnf'}

TASK DETAIL
  https://phabricator.wikimedia.org/T279753

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, Jyoo1011, JohnsonLee01, 
SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, 
JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to