I want to remove emoticons in my data that contains only text containing tweets. Each line corresponds to one tweet.
I get a bad character error for the ":)". 

```
error: bad character range :-) at position 4

```

What is wrong?

```
#remove emoticons
import re
emoji_pattern = re.compile("["
        u":)"
        u":-)"
        u":D"
        u":("
        u":-("
        "]+", flags=re.UNICODE)
with open('C:/Users/M/PycharmProjects/Bachelor_Thesis/test/data_sentiment.csv',"r", encoding="utf-8") as oldfile1, open('C:/Users/M/PycharmProjects/Bachelor_Thesis/test/data_sentiment_stripped_emoticons.csv', 'w',encoding="utf-8") as newfile1:
    for line in oldfile1:
        line=emoji_pattern.sub(r'', line)
        newfile1.write(line)
newfile1.close()

```