Mar-23-2020, 01:28 PM
(Mar-22-2020, 11:29 AM)ndc85430 Wrote: Sigh. Is there a reason you aren't callingget_text
on your variables on line 49 now, exactly like you're doing on line 27?
Yes, the variables declared on lines 9-11 are all global. You should declare your function to take parameters, like you had done in post 5 and then pass the values in. You can find much information on the internet about why using globals is bad.
Ah, you're handling the exception. I wasn't reading the code properly, so disregard my comment about the traceback. If you're interested, the standard library traceback module is useful when you want to print tracebacks during exception handling.
ndc85430,
Would calling get_text on line 49 resolve the error? I am feeling as if the .py currently properly connects to my MariaDB database; however for some reason I do not understand as to why I am having so much difficulties understanding how to pass the variables off correctly.
Thank you for the traceback library information.
“And one of the elders saith unto me, Weep not: behold, the Lion of the tribe of Juda, the Root of David, hath prevailed to open the book,...” - Revelation 5:5 (KJV)
“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)
#LetHISPeopleGo
“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)
#LetHISPeopleGo