Python Forum

Full Version: unexpected EOF while parsing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please can you help me where is the issue ? i do not know what i do wrong. thanks


import cx_Oracle

try:
    connection=cx_Oracle.connect("dw1","dw2","//local/DW3")
    
    with connection.cursor() as cursor:
        plsql= """select ce.num1 from tab ce where ce.num2=1"""
Error:
File "<ipython-input-28-410b62ddf535>", line 9 plsql = """select ce.num1 from tab ce where ce.num2=1""" ^ SyntaxError: unexpected EOF while parsing
You have a try without a corresponding except or finally. I get a different error message, but that is probably an Iron Python vs C Python thing.

Please use python tags (button in the editor) when posting code,