Menu

ViewCVS and MySQLdb

Help
Albert
2005-11-13
2012-09-19
  • Albert

    Albert - 2005-11-13

    Hello,

    I have a collection of python scripts which allow mysql querying of my cvs repository via the viewcvs web front end. Ultimately, I'm receiving a 'No database selected error' from mysql. However, I know the database exists, and can confirm it with mysql show. The problem seems to have originated from the viewcvs python scripts--perhaps the viewcvs query.py script isn't properly obtaining the database name from the viewcvs configuration file? Anyone know what else could possibly be wrong--maybe problem is indeed with mysqldb?

    Here is the traceback:

    Traceback (most recent call last):
    File "/usr/local/viewcvs-1.0-dev/lib/query.py", line 397, in main
    commits = run_query(server, form_data, viewcvs_link)
    File "/usr/local/viewcvs-1.0-dev/lib/query.py", line 354, in run_query
    db.RunQuery(query)
    File "/usr/local/viewcvs-1.0-dev/lib/cvsdb.py", line 394, in RunQuery
    cursor.execute(sql)
    File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 137, in execute
    self.errorhandler(self, exc, value)
    File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 33, in defaulterrorhandler
    raise errorclass, errorvalue
    OperationalError: (1046, 'No database selected')

     
    • Andy Dustman

      Andy Dustman - 2005-11-14

      It may exist, but you haven't selected it. Usually the database is specified when opening the connection. I don't really know about the viewcvs configuration for MySQL, but you should at that some more.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.