Problema obdc generar json

11 views
Skip to first unread message

Fabián

unread,
Nov 18, 2014, 2:41:07 PM11/18/14
to pythona...@googlegroups.com
Me sale este error al generar con python un json

Traceback (most recent call last):
  File "weather_canelones.py", line 6, in <module>
    conn = pyodbc.connect(connstr)
pyodbc.Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')


connstr = 'DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=services;USER=root;PASSWORD=xxxxxxx';

conn = pyodbc.connect(connstr)

cursor = conn.cursor()

 

cursor.execute("""

            SELECT id, temperatura, stermica, tiempo, humedad

            FROM tiempo_canelones

            """)

 

rows = cursor.fetchall()

Reply all
Reply to author
Forward
0 new messages