I'm working on a sentiment analysis program, it was working properly on a windows (python 3.4) but when I switched to a mac os (python 2.7) it gave me this error when i ran it:
SyntaxError: Non-ASCII character '\xc2' in file ./twitter.py on line 31, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
line 31 is where i try to remove the URLS from the tweets:
#removing urls(http:..)
twt = re.sub(r'(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?«»“”‘’]))', '', t)