Python Forum
unexpected EOF while parsing - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: unexpected EOF while parsing (/thread-41378.html)



unexpected EOF while parsing - dawid294 - Jan-03-2024

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



RE: unexpected EOF while parsing - deanhystad - Jan-03-2024

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,