I am running the below and am getting the error. Can anyone help?
import feedparser, MySQLdb
db = MySQLdb.connect(host='localhost',user='root',passwd='passsswd’, db=‘no’)
ERROR:
File "<ipython-input-6-0238cde77faf>", line 2
db = MySQLdb.connect(host='localhost',user='root',passwd='passsswd’, db=‘no’)
^
SyntaxError: EOL while scanning string literal
asked Sep 10, 2019 at 20:16
kikee1222
2,1146 gold badges33 silver badges51 bronze badges
1 Answer 1
You're using ’ and ‘ instead of ', which confuses the interpreter. Just replace all instances of ’ and ‘ with '.
answered Sep 10, 2019 at 20:21
Axiumin_
2,1562 gold badges17 silver badges26 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
default
passwd=value stays the same until), hinting that something's wrong, even before you run your code (similar to how the code looks like here in SO).