Page MenuHomePhabricator

plagiabot cannot connect to toolsdb using connect file
Open, Needs TriagePublicBUG REPORT


Traceback (most recent call last):
  File "/data/project/eranbot/gitPlagiabot/plagiabot/", line 864, in <module>
  File "/data/project/eranbot/gitPlagiabot/plagiabot/", line 859, in main
  File "/data/project/eranbot/gitPlagiabot/plagiabot/", line 620, in run
    self.report_uploads()  # report checked edits
  File "/data/project/eranbot/gitPlagiabot/plagiabot/", line 513, in report_uploads
    self.report_log.add_report(rep['new'], rep['diff_date'], rep['title_no_ns'], rep['ns'], rep['report_id'], rep['source'])
  File "/mnt/nfs/labstore-secondary-tools-project/eranbot/gitPlagiabot/plagiabot/", line 82, in add_report
    self.connect()  # TODO: handle InterfaceError: Can't connect to MySQL server...?
  File "/mnt/nfs/labstore-secondary-tools-project/eranbot/gitPlagiabot/plagiabot/", line 75, in connect
  File "/usr/lib/python2.7/dist-packages/MySQLdb/", line 86, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/", line 204, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (1045, "Access denied for user 'tools.eranbot'@'' (using password: NO)")

Event Timeline

Restricted Application added subscribers: Cyberpower678, Aklapper. · View Herald Transcript
JJMC89 removed a subscriber: Cyberpower678.

I've applied the below hotfix and restarted the enwiki job.

diff --git a/ b/
index 8d39e31..92e4cb4 100644
--- a/
+++ b/
@@ -70,7 +70,8 @@ class DbReportLogger(ReportLogger):
     def connect(self):
         self.conn = MySQLdb.connect(host=dbsettings.reporter_db_host,
-                                    read_default_file=config.db_connect_file,
+                                    user=config.db_username,
+                                    passwd=config.db_password,
         self.cursor = self.conn.cursor()

We have a new report now ( I don't know why using the connect file isn't working though.

The bot has stopped again - no new reports for over 4 hours. Thanks.

MusikAnimal added a subscriber: MusikAnimal.

I've applied the below hotfix and restarted the enwiki job.

Thanks for the hotfix! I think it's fine to commit this to the repo so the changes aren't lost. In fact, when I first attempted to move plagiabot to the copypatrol account (T306888#7931423) I needed to pull the credentials from the config file rather than using the connect file, since we'd need to use eranbot's credentials and not copypatrol's. So I think your hotfix is a good change to make, regardless.