Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie help
#19
(Aug-01-2018, 11:11 AM)dust Wrote: No, I'm using Python 3, as already detailed above.
if you run the above code with python3 you will get SyntaxError: Missing parentheses in call to 'print'

see
Error:
Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> print something File "<stdin>", line 1 print something ^ SyntaxError: Missing parentheses in call to 'print'
(Aug-01-2018, 11:11 AM)dust Wrote: Sorry, where? I can't see that anywhere in the code I listed. Forgive my ignorance but I don't know what you mean by tuples either. Newbie here.

from their code
albums = [('Exodus', 'Andy Hunter', '7/9/2002', 'Sparrow Records', 'CD'),
          ('Until We Have Faces', 'Red', '2/1/2011', 'Essential Records', 'CD'),
          ('The End is Where We Begin', 'Thousand Foot Krutch', '4/17/2012', 'TFKmusic', 'CD'),
          ('The Good Life', 'Trip Lee', '4/10/2012', 'Reach Records', 'CD')]
cursor.executemany("INSERT INTO albums VALUES (?,?,?,?,?)", albums)
albums is list of tuples. as you can see they supply it to cursor.executemany() method

(Aug-01-2018, 11:11 AM)dust Wrote: There wasn't any traceback, just a popup window stating "Syntax Error", as I already said. I can't cut/paste something that doesn't exist.

in this code there is nothing that will pop-up. All error messages will be printed to the terminal/command prompt. In your original post you have example of traceback you get. We need the same thing for this SynatxError
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


Messages In This Thread
Newbie help - by dust - Jul-03-2018, 03:33 PM
RE: Newbie help - by gontajones - Jul-03-2018, 03:43 PM
RE: Newbie help - by buran - Jul-03-2018, 03:44 PM
RE: Newbie help - by gontajones - Jul-03-2018, 03:45 PM
RE: Newbie help - by buran - Jul-03-2018, 03:54 PM
RE: Newbie help - by gontajones - Jul-03-2018, 04:04 PM
RE: Newbie help - by dust - Jul-03-2018, 04:53 PM
RE: Newbie help - by buran - Jul-03-2018, 05:41 PM
RE: Newbie help - by dust - Jul-03-2018, 05:44 PM
RE: Newbie help - by dust - Jul-04-2018, 08:25 AM
RE: Newbie help - by gontajones - Jul-04-2018, 09:35 AM
RE: Newbie help - by dust - Jul-04-2018, 09:41 AM
RE: Newbie help - by gontajones - Jul-04-2018, 10:01 AM
RE: Newbie help - by dust - Jul-04-2018, 10:03 AM
RE: Newbie help - by dust - Jul-25-2018, 09:07 AM
RE: Newbie help - by buran - Jul-25-2018, 09:14 AM
RE: Newbie help - by buran - Jul-25-2018, 09:16 AM
RE: Newbie help - by dust - Aug-01-2018, 11:11 AM
RE: Newbie help - by buran - Aug-01-2018, 11:24 AM
RE: Newbie help - by dust - Aug-01-2018, 11:35 AM
RE: Newbie help - by buran - Aug-01-2018, 11:52 AM
RE: Newbie help - by dust - Aug-01-2018, 12:34 PM
RE: Newbie help - by buran - Aug-01-2018, 12:54 PM
RE: Newbie help - by micseydel - Aug-01-2018, 06:29 PM
RE: Newbie help - by dust - Aug-01-2018, 09:19 PM
RE: Newbie help - by Larz60+ - Aug-29-2018, 09:25 AM
RE: Newbie help - by dust - Aug-29-2018, 10:04 AM
RE: Newbie help - by dust - Aug-29-2018, 01:14 PM
RE: Newbie help - by Larz60+ - Aug-29-2018, 02:53 PM

Forum Jump:

User Panel Messages

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