Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

USER INPUT IN WEB.PY NOT WORKING

limorSep 20 2016 — edited Sep 20 2016

Hi,

I have a webservice (web.py + cx_Oracle) which needs the user input data.

1.) First I define a web object

data=web.input()

2.) add value to a list

a = [data.ID]

3.) create query

query = "SELECT ... FROM... WHERE a.id = %s;"

Until here it works. But the nex step is to execute the query:

cursor.execute(query, a)

This step will produce an error message. In my case:

'ascii' codec can't decode byte 0xfc in position 36: ordinal not in range(128)

If I define the user input id directly into the sql statement it works fine... does anyone know this kind of issue?

This post has been answered by limor on Sep 20 2016
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 18 2016
Added on Sep 20 2016
1 comment
456 views