Linked Questions

1409 votes
27 answers
2.5m views

I have a text file that looks like: ABC DEF How can I read the file into a single-line string without newlines, in this case creating a string 'ABCDEF'? For reading the file into a list of lines, ...
klijo's user avatar
  • 16.6k
520 votes
20 answers
1.3m views

as3:~/ngokevin-site# nano content/blog/20140114_test-chinese.mkd as3:~/ngokevin-site# wok Traceback (most recent call last): File "/usr/local/bin/wok", line 4, in Engine() File "...
fisherman's user avatar
  • 10.8k
3 votes
4 answers
4k views

I got the following error when installing the Google Cloud SDK on my Windows 10 computer: ERROR: gcloud failed to load: 'ascii' codec can't decode byte 0xe1 in position 13: ordinal not in range(128) ...
bendaf's user avatar
  • 3,061
1 vote
1 answer
4k views

I'm working on scraping Oregon Teacher License data for a project I'm doing. Here's my code: educ_employ = tree.xpath('//tr[15]//td[@bgcolor="#A9EDFC"]//text()') print educ_employ #[u'Jefferson ...
otteheng's user avatar
  • 604
1 vote
1 answer
2k views

I am trying to write a Python script which acts similar to Ctrl + S on a Chrome web browser, it saves the HTML page, downloads any links on the webpage and finally, replaces the URIs of the links with ...
user3019191's user avatar
0 votes
2 answers
1k views

Trying to install pyodbc: pip install pyodbc it got the following error. I install a different item peewee specifically and it install without giving me error. I further tried with pip install pymssql ...
saviour123's user avatar
  • 1,192
0 votes
1 answer
1k views

from textblob import TextBlob as tb from sqlalchemy import create_engine import pandas as pd first i had created engine using sqlalchemy as engine=create_engine("mysql+mysqldb://root:ja@localhost:3306/...
jarry jafery's user avatar
  • 1,036
1 vote
2 answers
1k views

I was trying to read a txt file in python. After the following input: f = open("test.txt","r") #opens file with name of "test.txt" print(f.read(1)) print(f.read()) instead of looking at the text I'm ...
Blue Moon's user avatar
  • 4,791
2 votes
3 answers
1k views

I need to replace non ASCII char like ¾ in Python but I get SyntaxError: Non-ASCII character '\xc2' in file test.py but no encoding declared; see http://www.python.org/peps/pep-0263.html for details` ...
Erik's user avatar
  • 71
1 vote
2 answers
1k views

I'm running a Django web app and creating a REST Api using Django Rest Framework. I've created a basic list/update view however when I go to the url, I get 'A server error occurred. Please contact ...
Rohan G's user avatar
  • 23
2 votes
1 answer
581 views

I have an input csv file and when I try to do some operations on it and make an output file, I am getting this error. At first I got the 'utf-8' Error so I searched and checked the encoding of my file ...
Fanatic's user avatar
  • 55
0 votes
1 answer
444 views

getting the error while reading data from DB2 table using PYTHON 3.x. UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 10: ordinal not in range(128)
sayan_sen's user avatar
  • 345
0 votes
2 answers
372 views

I am trying to install a package that I have used many times with python 2.7 and ubuntu 14.04, however it fails now with following error: Cleaning up… Exception: Traceback (most recent call last): ...
Stefan's user avatar
  • 868
0 votes
1 answer
254 views

I deployed my Django project that uses Apache and MySQL. all apps features work fine, but in an application's views.py, when I try to access it, it raises this error. UnicodeDecodeError: 'ascii' codec ...
art_cs's user avatar
  • 811
0 votes
0 answers
301 views

I have a Python script that is running in AWS Glue. Up until last month is was working fine and I ran into the following error. I've seen several different nasty hacks suggested on SO and am having ...
user avatar

15 30 50 per page