Trending questions in Python

0 votes
0 answers

TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Hi guys i have below code . ...READ MORE

Oct 30, 2019 in Python by sumanth
• 190 points
12,991 views
0 votes
0 answers

python: how to print the data frame columns with out index and also left indent

Hi There, Basically I want to read a ...READ MORE

Jul 9, 2021 in Python by balaji

edited Mar 4, 2025 526 views
0 votes
1 answer

Error:No module named MySQLdb

Hii @kartik, Try this code: pip install PyMySQL and then ...READ MORE

Jun 26, 2020 in Python by Niroj
• 82,800 points
16,793 views
+1 vote
1 answer

'utf-8' codec can't decode byte 0xa9 in position 12527: invalid start byte

Hello, You can always safely read in binary ...READ MORE

Jun 30, 2020 in Python by Niroj
• 82,800 points
16,545 views
0 votes
1 answer

How to Clone Conda environment?

Hi@akhtar, You can use the --clone command to ...READ MORE

Jun 22, 2020 in Python by MD
• 95,460 points
16,798 views
0 votes
1 answer

Error:AttributeError: 'module' object has no attribute 'tests'

Hello @kartik, The problem was that test couldn't find ...READ MORE

Aug 7, 2020 in Python by Niroj
• 82,800 points
14,675 views
0 votes
1 answer

AttributeError: module 'http' has no attribute 'client

Hi, I have encountered the same issue. It ...READ MORE

Mar 18, 2021 in Python by Lalith Kumar

edited Mar 5, 2025 12,084 views
0 votes
1 answer

How to create a user in Django?

Hello @kartik, The correct way to create a ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,800 points
14,161 views
0 votes
1 answer

ModuleNotFoundError: No module named 'sqlalchemy'

Hi@akhtar, You need to install sqlalchemy module in your condo ...READ MORE

Jun 26, 2020 in Python by MD
• 95,460 points
16,379 views
0 votes
0 answers

How do I make a command in python?

Hi. I and my sister wanted to ...READ MORE

Jun 28, 2021 in Python by anonymous

edited Mar 4, 2025 577 views
0 votes
0 answers

I am using Django to create a user and an object when the user is created. But there is an error

I am using Django to create a ...READ MORE

Jun 30, 2021 in Python by Sudhir

edited Mar 4, 2025 467 views
0 votes
0 answers

why there has an error i tried so many time

#Function is defined def eq1( vi, t, a): d ...READ MORE

Jun 28, 2021 in Python by Zahir

edited Mar 4, 2025 507 views
0 votes
1 answer

Error:“CSRF token missing or incorrect” while post parameter via AJAX in Django

Hello @kartik, The simplest way to include the {{csrf_token}} value ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,800 points
14,258 views
0 votes
1 answer

How do I execute multiple SQL statements at once? - Python

You can use sqlite3 module. Have a ...READ MORE

Jun 20, 2019 in Python by Travis
32,385 views
0 votes
2 answers

Python error “ImportError: No module named”

use the dir() function for particular import ...READ MORE

Jun 6, 2020 in Python by sahil
• 500 points
17,158 views
0 votes
0 answers

How to check an IP address is within a range of two IPs in Python?

I have an IP address and I'm ...READ MORE

Jun 26, 2021 in Python by Izahaak

edited Mar 4, 2025 556 views
0 votes
1 answer

Error: port is already in use of Django Server

Hii @kartik, Just type sudo fuser -k 8000/tcp. This ...READ MORE

May 6, 2020 in Python by Niroj
• 82,800 points
18,377 views
0 votes
0 answers

I want to raise the value by 500 of existing column (of annual income) in python

I'm trying to model a ubi on ...READ MORE

Jun 25, 2021 in Python by Lee

edited Mar 4, 2025 477 views
0 votes
0 answers

'tuple' object is not callable

mass=int(input("Enter mass:")) change=int(input('enter the change in temperature:')) specific_heat=4184 cal=mass*specific_heat*change print("Your total ...READ MORE

Jun 25, 2021 in Python by Sukesh

edited Mar 4, 2025 482 views
0 votes
0 answers

"Turtle object has no attribute title"

import turtle screen = turtle.Turtle() screen.title("First Turtle by Rubayet") ...READ MORE

Jun 20, 2021 in Python by Rubayet

edited Mar 4, 2025 524 views
0 votes
1 answer

Splitting a column with multiple values in python

i guess pandas explode function can help ...READ MORE

Nov 19, 2022 in Python by Sukhwinder

edited Mar 5, 2025 4,558 views
0 votes
0 answers

MYSQL CONNECTOR ISSUE

I AM TRYING TO CONNECT MYSQL(8.0) AND ...READ MORE

Jun 19, 2021 in Python by anonymous

edited Mar 4, 2025 446 views
0 votes
0 answers

How can I fetch the data of one table by joining the other tables in django?

Need help in making a query, i ...READ MORE

Jun 17, 2021 in Python by anonymous

edited Mar 4, 2025 501 views
0 votes
2 answers

ModuleNotFoundError: No module named 'pythoncom' in pyttsx3

even i faced the same problem ...just ...READ MORE

Jun 2, 2020 in Python by anonymous
17,813 views
0 votes
1 answer

Model Form “object has no attribute 'cleaned_data'” in Django?

Hello @kartik, For some reason, you're re-instantiating the ...READ MORE

Apr 29, 2020 in Python by Niroj
• 82,800 points
18,266 views
0 votes
0 answers

Im confused about this error in python

When i type this def books_available(books):     """Show ...READ MORE

Jun 17, 2021 in Python by robert

edited Mar 4, 2025 436 views
+1 vote
3 answers

AttributeError: 'module' object has no attribute 'listen"

You'll have to install the pyaudio module ...READ MORE

Oct 3, 2019 in Python by Liala
10,027 views
0 votes
1 answer

How to look up a dictionary value with a variable in Django template?

Hii @kartik, Write a custom template filter: from django.template.defaulttags ...READ MORE

Aug 3, 2020 in Python by Niroj
• 82,800 points
14,042 views
0 votes
1 answer

ImportError: cannot import name 'six' from 'django.utils' (/path-to-project/project/niroj/lib/python3.7/site-packages/django/utils/init.py)

Hello @kartik, Upgrading the packages will resolve the ...READ MORE

Aug 5, 2020 in Python by Niroj
• 82,800 points
13,872 views
0 votes
2 answers

Python error " import requests ImportError: No module named requests"

Hello, Open Cmd or Powershell as Admin. type pip ...READ MORE

Nov 28, 2020 in Python by Rohan
• 200 points
19,193 views
0 votes
0 answers

Missing one positional argument

Am trying to retrieve a bar graph ...READ MORE

Jun 5, 2021 in Python by Bhavesh

edited Mar 4, 2025 596 views
0 votes
1 answer

How can I get all the request headers in Django?

Hello @kartik,  You can use request.headers to access the HTTP ...READ MORE

Jun 30, 2020 in Python by Niroj
• 82,800 points
15,169 views
0 votes
0 answers
0 votes
1 answer

Error:Manager isn't accessible via model instances

for i in range READ MORE

Mar 28, 2021 in Python by anonymous

edited Mar 5, 2025 8,208 views
0 votes
1 answer

How can I have Multiple Models in a single django ModelForm?

Hello @kartik, You can just show both forms ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,800 points
13,226 views
0 votes
1 answer

Python Error ""ValueError: could not broadcast input array from shape (4) into shape (1000)""

There are better ways of achieving the ...READ MORE

Jun 14, 2019 in Python by Faiza
31,610 views
0 votes
0 answers

converting from bytes to json using python

I have an application that sends me ...READ MORE

Jun 1, 2021 in Python by leauradmin
• 110 points

edited Mar 4, 2025 553 views
0 votes
1 answer

How to output text from database with line breaks in a django template?

Hello @kartik, Use linebreaks or linebreaksbr filter: {{ text|linebreaks }} Or surround the text ...READ MORE

Jun 24, 2020 in Python by Niroj
• 82,800 points
15,169 views
0 votes
0 answers

I am currently working on my face recognition opencv and this issue keeps showing after I log it. Exception in Tkinter callback Traceback (most recent call last).

​ Exception in Tkinter callback Traceback (most recent call ...READ MORE

May 29, 2021 in Python by anonymous

edited Mar 4, 2025 539 views
0 votes
1 answer

Error:Django Rest Framework — no module named rest_framework

Hello @kartik, You just need to install django ...READ MORE

Jun 25, 2020 in Python by Niroj
• 82,800 points
15,043 views
0 votes
0 answers

from sklearn.linear_model import LinearRegression ,why its coming error

from sklearn.linear_model import LinearRegression reg=linear_model.Lin ...READ MORE

May 26, 2021 in Python by Tangudu Sravani

edited Mar 4, 2025 565 views
0 votes
1 answer

How to check if an element is present in a Django queryset?

Hello @kartik, You can use the following code: if ...READ MORE

May 27, 2020 in Python by Niroj
• 82,800 points
16,214 views
0 votes
1 answer

How to convert multiple columns to string in pandas dataframe?

Hi, To convert multiple columns to string, include a list of ...READ MORE

Jul 19, 2019 in Python by Taj
• 1,080 points
29,693 views
+1 vote
1 answer

Error:Getting Site Matching Query Does Not Exist Error after creating django admin

Hello @kartik, The Site object for your Django project is ...READ MORE

Jun 22, 2020 in Python by Niroj
• 82,800 points
14,922 views
0 votes
1 answer

How to call function that takes an argument in a Django template?

Hello @kartik, You cannot call a function that ...READ MORE

Jun 23, 2020 in Python by Niroj
• 82,800 points
14,846 views
0 votes
1 answer

'str' object has no attribute 'read'

Hi@zena, In the below section you are trying ...READ MORE

Jun 29, 2020 in Python by MD
• 95,460 points
14,622 views
0 votes
0 answers

Get index of a list from dataframe

Hi, this is my dataframe. Name Age 0 Mike ...READ MORE

May 22, 2021 in Python by anonymous

edited Mar 4, 2025 449 views
0 votes
1 answer

I am not able to install pywin32 into my Macos ..I tried all the ways and I could not fix the error...can you please help me

Hello @Harikrishna, For your query you can refer ...READ MORE

Nov 23, 2020 in Python by Niroj
• 82,800 points
8,189 views
0 votes
2 answers

How to change the font size on a matplotlib plot?

Functions dealing with text like label, title, etc. accept ...READ MORE

Jan 4, 2021 in Python by Carlos
6,248 views