python - Syntax error at line 89 -



python - Syntax error at line 89 -

i'm getting syntaxerror: invalid syntax @ line 89 (insert_temp = ...)

i cannot find syntax error (when commented out, line 92 gives same error - insert_status = ...). can please help me out? i've been looking @ weeks.

this specific portion of code syntax error.

# pass temps & status db insert_temp = """insert current_temp(date_time, in_temp, car_1_temp, car_2_temp, car_3_temp) values (%d, %d, %d, %d, %d) % (now(), i_temp, c_1_temp, c_2_temp, c_3_temp)""" insert_status = """insert 'status' (date_time, cool_status, heat_1_status, heat_2_status,in_fan_status, car_3_fan) values (now(), $c_status, $h_1_status, $h_2_status,$i_fan_status, $c_3_fan)""" try: # execute insert_temp command cursor.execute(insert_temp) # commit changes in database db.commit() except: # rollback in case there error db.rollback() try: # execute insert_status command cursor.execute(insert_status) # commit changes in database db.commit() except: # rollback in case there error db.rollback()

the finish file (py_ferm_v1.py) can found at: link github repository

its designed pass info between mysql db , alamode (arduino).

you have try block no except block next it, above line. why should post entire code in question.

python syntax-error

Comments

Popular posts from this blog

c# - ASP.NET MVC Sequence contains no matching element -

java - Parsing XML, skip certain tags -

rest - How to invalidate user session on inactivity in a stateless server? -