• Register

Recent questions tagged python-2

0 votes
1 answer 7 views
Problem: What is this? Need help > Attributeerror: 'nonetype' object has no attribute 'encode'
asked 5 days ago Irenka Kiri 17.9k points
0 votes
1 answer 9 views
Problem: Hey, i need some help to relolve this error Unicodedecodeerror: 'ascii' codec can't decode byte 0xe2.
asked 6 days ago Ryan evans 1.5k points
0 votes
1 answer 4 views
Problem: Can anyone tell me the solution to this problem > Write a script which displays documentation of python's input function.
asked May 6 ummeshani 10.8k points
0 votes
1 answer 7 views
Problem: Is anyone available to assist me and resolve this issue? Python script to read a file line by line
asked May 5 Ifra 37.2k points
0 votes
1 answer 4 views
Problem: In Python 2.7, see the following error, when trying to cast type to ensure it matches the output schema. UnicodeEncodeError: 'ascii' codec can't encode character in position 0: ordinal not in range(128) Tried to find why and reproduced the error in Jupiter. By simply typing in.What is the way to cast type to string that can handle this type of error? Thanks!
asked May 3 sumaiya simi 43.9k points
1 vote
1 answer 6 views
Problem: I ahave downloaded Python and after unziffing I got this message : Fatal python error: py_initialize: unable to get the locale encoding.
asked May 2 PkGuy 23.5k points
0 votes
1 answer 10 views
Problem: I am writing a program to censor some words. def censor(sentence, word): splitted_sentence = sentence.split() #splitted_sent = ["he", "is", "a", "clucking", "boy"] censored = [item.replace(item, "*" * len(item) for item in word)] return censored ... is to filter the word "clucking" in a sentence. But when I run it, it says: Generator expression must be parenthesized if not sole argument.
asked Apr 30 muktaa 34.6k points
1 vote
1 answer 46 views
Problem: Any solution to this problem please? Runtimewarning: invalid value encountered in true_divide.
asked Apr 27 PkGuy 23.5k points
0 votes
1 answer 12 views
Problem: Please lend me a hand to solve this problem,"Wsgirequest' object has no attribute get ".
asked Apr 27 salim1 60.6k points
0 votes
1 answer 17 views
Problem: Please solve it … Because I am unable to find out the solution .. How to add elements to list in python
asked Apr 27 Ifra 37.2k points
0 votes
1 answer 4 views
Problem: Given the names and grades for each student in a Physics class of students, store them in a nested list and print the name(s) of any student(s) having the second lowest grade. Note: If there are multiple students with the same grade, order their names alphabetically and print each name on a new ... : >>[['Harry', 37.21], ['Berry', 37.21], ['Tina', 37.2], ['Akriti', 41], ['Harsh', 39]]
asked Apr 26 anika11 32.2k points
0 votes
1 answer 3 views
Problem: I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules in PyCharm (Numpy, Pandas, etc), but when I tried installing Tensorflow it didn't install, and I ... some of the things which were suggested to other people, but nothing worked (this included installing Flask). How can I install Tensorflow? Thanks.
asked Apr 25 sumaiya simi 43.9k points
0 votes
1 answer 3 views
Problem: I am running OS X 10.9.4 on my laptop, with Chrome 40.0.2214.94 and Selenium 2.44.0, which I installed for Python 2.7 with easy_install. My code is this basic code from a selenium walkthrough: from selenium import webdriver from selenium.webdriver.common. ... or location changes, as I am not the most well versed in computing! Thanks everyone, and I hope my question isn't too simple!
asked Apr 23 munim01 21k points
0 votes
1 answer 6 views
Problem: I am using the list of comprehension to replace carriage return "\n" with this "<br>"It throws the error 'NoneType' object has no attribute 'replace'. I just do not know how to put a if is not none statement in the list comprehension. Any help greatly appreciated.
asked Apr 21 ummesalma 29.2k points
0 votes
1 answer 4 views
Problem: Can anyone tell me that when python is running in the interactive mode?
asked Apr 21 Ifra 37.2k points
0 votes
1 answer 2 views
Question: I'm doing some python online tutorials, and I got stuck at an exercise:A palindrome is a word which is spelled the same forwards as backwards. For example, the word racecar is a palindrome: the first and last letters are the same (r), the second and second-last letters ... the word is for example ,,sarcas,, , the output is incorect. So I need a fix to my code so it works for any word.
asked Apr 18 munim01 21k points
0 votes
0 answers 4 views
Poblem: Need help so to get rid of this error. Error unsupported video type or invalid file path.
asked Apr 18 PkGuy 23.5k points
0 votes
1 answer 9 views
Problem: Hi, I have a small question. What is this "<> " called in python?
asked Apr 16 Yeamin 22k points
0 votes
1 answer 4 views
Problem: How can we read inputs as integers in Python 2?
asked Apr 13 sumaiya simi 43.9k points
0 votes
1 answer 5 views
Problem: I'm a complete noob when it comes to programming and having an issue with python maths. If I run the following line of code, python returns 97 as the answer.
asked Apr 13 ummesalma 29.2k points