Linked Questions

-1 votes
1 answer
17k views

Here is my code: from pytrends.request import TrendReq import pandas as pd import time startTime = time.time() pytrend = TrendReq(hl='en-GB', tz=360) colnames = ["keywords"] df = pd....
John's user avatar
  • 49
0 votes
2 answers
2k views

Possible Duplicate: UnicodeDecodeError, invalid continuation byte I am trying to use characters such as á and ô in a python generated PDF. The program uses the dateutil module (and several others) ...
damned truths's user avatar
0 votes
1 answer
3k views

I am crawling a particular url from google.com but i get some error 'utf8' codec can't decode byte 0xc3 in position 72: invalid continuation byte Code: import re import os import MySQLdb import ...
Mounarajan's user avatar
  • 1,437
1 vote
1 answer
2k views

I'm trying to read a csv file using python on jupyter notebook using the following command: data = pandas.read_csv("/Users/noha/Desktop/SongCSV.csv") However, I keep getting this error: ...
user130996's user avatar
0 votes
1 answer
586 views

I write some files as .txt with python3.6 in mac. And then, when I try to read them using: f = open(...,'r') lines = f.readlines() I got this error: UnicodeDecodeError: 'utf-8' codec can't decode ...
Yanpei's user avatar
  • 31
0 votes
0 answers
167 views

I am trying to convert the response from utorrent dht network from bytes to string but I get UnicodeDecodeError errors ping_query = { 't': '0f', 'y': 'q', 'q': 'ping', 'a': {'id': ...
jake wong's user avatar
  • 5,248
0 votes
0 answers
159 views

I am using Python 3.7. I have data being read from two files. Both contain UTF-8 data (well, technically...). One is properly "encoded" into UTF-8 while the other was written as a decoded bytestream. ...
inetknght's user avatar
  • 4,457
0 votes
0 answers
127 views

I downloaded the sentiment140 dataset and tried opening it using pd.read_csv() and I got the UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 232719-232720: invalid continuation byte ...
i'mgnome's user avatar
  • 545
21 votes
6 answers
62k views

I'm trying to do some data work in Python pandas and having trouble writing out my results. I read my data in as a CSV file and been exporting each script as it's own CSV file which works fine. Lately ...
Wizuriel's user avatar
  • 3,767
4 votes
5 answers
14k views

My django web app makes and save docx and I need to make it downloadable. I use simple render_to_response as below. return render_to_response("test.docx", mimetype='application/vnd.ms-word') However, ...
brsbilgic's user avatar
  • 11.9k
6 votes
2 answers
19k views

Im currently trying to use some simple regex on a very big .txt file (couple of million lines of text). The most simple code that causes the problem: file = open("exampleFileName", "r") for ...
EliteKaffee's user avatar
6 votes
2 answers
17k views

When I launch my app, I get this error UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 2566: invalid continuation byte. I use UTF8 in my HTML file <meta charset="utf-8" /> ...
tsil's user avatar
  • 2,069
5 votes
1 answer
8k views

I want to convert a byte variable to string. Of course, there are previous questions related to mine. However, trying to hash in md5() the content of a file this way: import hashlib with open("C:\...
user avatar
2 votes
3 answers
10k views

I have the following code import msgpack def deserialize(data) return msgpack.loads(data) for data in stream: print deserialize(data) Now, the issue is that some data is (maybe) corrupted.. ...
frazman's user avatar
  • 33.5k
1 vote
2 answers
11k views

okay, I have: # -*- coding: utf-8 -*- in my python file. the snippet: opener = urllib2.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0')] opener.addheaders = [('Accept-Charset', 'utf-...
user avatar

15 30 50 per page