Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie help
#21
If you are certain that you are using python 3.6, FIRST thing to fix your code is to change from print statement to print function!
e.g.
print(cursor.fetchall())
do it for ALL print statements and then try again to run your code!
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#22
Hooray, I put brackets around all the Print statements and it's now working. Why didn't you just recommend that in the first place instead of sending me teacher-like PMs about forum etiquette that I clearly demonstrated in my very first post that I'd already read up on?

Can I also say, you're not being very helpful here, it just feels like you're losing your rag at me for making mistakes that may be trivial to you but, to re-iterate again, I'm *new* to this. I don't have a clue what you mean when you're talking about Statements vs Functions. I'm simply trying to follow some online tutorials.
Reply
#23
(Aug-01-2018, 12:34 PM)dust Wrote: Why didn't you just recommend that in the first place instead of sending me teacher

Because you were unclear what the Invalid Syntax error is. That is why I'm asking for FULL TRACEBACK!

(Aug-01-2018, 12:34 PM)dust Wrote: I'm simply trying to follow some online tutorials
Find a tutorial for python3

(Aug-01-2018, 12:34 PM)dust Wrote: I don't have a clue what you mean when you're talking about Statements vs Functions.
You also don't know what tuple is... That is why you should start with basics. Just copy paste and try to run some code from somewhere will not get you anywhere...
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#24
It looks like part (though not all) of the confusion here is probably because IDLE doesn't give tracebacks for syntax errors, which is very unfortunate.
Reply
#25
(Aug-01-2018, 12:54 PM)buran Wrote: Because you were unclear what the Invalid Syntax error is. That is why I'm asking for FULL TRACEBACK!
Hello? There was no traceback to copy/paste, have said that already, are you even reading anything I'm writing here? Also, there's no need to SHOUT.

(Aug-01-2018, 06:29 PM)micseydel Wrote: It looks like part (though not all) of the confusion here is probably because IDLE doesn't give tracebacks for syntax errors, which is very unfortunate.
It seems so. Thank you for clarifying that.

(Aug-01-2018, 12:54 PM)buran Wrote: Find a tutorial for python3
Super-helpful dismissive response there. How on earth am I supposed to know if a tutorial site I locate is Python 2 or Python 3?

(Aug-01-2018, 12:54 PM)buran Wrote: You also don't know what tuple is... That is why you should start with basics. Just copy paste and try to run some code from somewhere will not get you anywhere...
It's worked for the rest of my coding life. I learn by doing. I also learn by going on forums like this and encountering usually-helpful people who talk me through where I'm going wrong and don't shout and talk down to me.
Reply
#26
find a decent IDE (VS Code or PyCharm are good) there is always a traceback available in the call stack, IDLE is one of the worst IDE's out there, and doesn't report tracebacks. It should never be packaged with python (which is a product of python.org, not python-forum.io).
Reply
#27
Thanks for the helpful reply, I did a quick Google search and can see it's kinda 50/50 as to what people prefer.

https://www.reddit.com/r/Python/comments...community/

I'll give VS Code a go for now, cheers for the tip, much appreciated. :)



EDIT: VS Code installed and am finding it's already a hundred times more complicated than IDLE. I think the database-learning will be taking a backseat for some time while I start from the beginning again... :)
Reply
#28
Testing...?
Reply
#29
Quote:I'll give VS Code a go for now, cheers for the tip, much appreciated. :)
You won't be disappointed.
Before you start, look at snippsat's tutorial which will guide you through.
https://python-forum.io/Thread-VS-Code-from-start
I write my own tests, only because I have done it for over 40 years, you can look at: https://pypi.org/search/?q=testing
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020