Menu

DNS error?

Help
Peter
2005-01-30
2012-09-19
  • Peter

    Peter - 2005-01-30

    I got this error in a Python script - call it X - which until yesterday ran without problem:

    OperationalError: (2005, "Unknown MySQL Server Host 'mysql4db.gradwell.net' (2)")

    X uses a module - call it db - which connects to MySQL using MySQLdb. Module X uses functions in db to connect to the database and retrieve results.
    Module X also calls a function in db which opens a separate connection to the database and retrieves some resuls. The error occurs after db has retrieved results. It was reproducible, not a one off thing, and I fixed it by passing db the first connection so it did not need to open another. I cannot understand how this could be a DNS error. I think it is something else. I wonder could it result from being careless about closing connections?

    MySQLdb v1.0.0, MtSQL server 4.1.7-log. Python is version 2.3.4. The OS is 'FreeBSD 4.8-STABLE'.

    Peter

     
    • Andy Dustman

      Andy Dustman - 2005-01-30

      That message comes from the MySQL client library, so I don't think it's any way it can be a MySQLdb error. But try MySQLdb-1.1.9 anyway. I don't think it has anything to do with closing or not closing connections; you'd get a different error.

       
    • Peter

      Peter - 2005-01-31

      OK, thanks for your help - and the module too. (I don't think it "sucks rocks" whatever that means!)

       

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.