Trending questions in Python

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,840 points
15,692 views
0 votes
1 answer

How to add multiple columns to pandas dataframe in one assignment?

Hello @kartik, You could use assign with a dict of ...READ MORE

Jun 15, 2020 in Python by Niroj
• 82,840 points
16,142 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
15,518 views
0 votes
1 answer

How to change a Django form field to a hidden field?

Hello @kartik, If you have a custom template ...READ MORE

Jul 29, 2020 in Python by Niroj
• 82,840 points
14,092 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 27 views
+1 vote
1 answer

How to create a file and save it to a model's FileField in Django?

Hello @kartik, Basically, a field declared as a FileField, ...READ MORE

Jun 30, 2020 in Python by Niroj
• 82,840 points
15,277 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
16,332 views
+1 vote
1 answer

Error:Pandas read_csv low_memory and dtype options

Hello @kartik, Try this: dashboard_df = pd.read_csv(p_file, sep=',', error_bad_lines=False, ...READ MORE

Jun 22, 2020 in Python by Niroj
• 82,840 points
15,607 views
0 votes
0 answers

The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

I couldn't figure out the problem. here my ...READ MORE

Dec 17, 2020 in Python by muammer
• 120 points
7,980 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 24 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,840 points
13,375 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 23 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 22 views
0 votes
2 answers

How can I write code to find a palindrome in python without using string functions?

x="malayalam" y="" for i in x: ...READ MORE

Nov 3, 2020 in Python by Thangaraj
23,519 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,840 points
14,875 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,840 points
12,759 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
30,925 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 26 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 3,460 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 10,383 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,840 points
12,920 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 29 views
0 votes
0 answers
0 votes
2 answers

ModuleNotFoundError: No module named 'folium'

Following Command install it will work: conda install ...READ MORE

Aug 28, 2020 in Python by Sunil Patil
14,464 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 36 views
+1 vote
5 answers

Tkinter error: tkinter.TclError: bad geometry specifier

You have to use the character ‘x’ ...READ MORE

May 9, 2019 in Python by Tina
19,676 views
0 votes
2 answers

How do I convert text file to CSV file with only plain python. Meaning no panda or any other special module?

Steps to Convert Text File to CSV ...READ MORE

Oct 15, 2020 in Python by Abdul Shekh
9,700 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 29 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
14,541 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,840 points
12,225 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,840 points
16,454 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 22 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,840 points
12,513 views
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 7,107 views
0 votes
0 answers

cannot connect to Visual code thru Python, getting 500 error code

500 Sorry, something went wrong on our system. ...READ MORE

May 19, 2021 in Python by Kailash

edited Mar 4 22 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
17,688 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,840 points
15,258 views
0 votes
0 answers

Could not find a version that satisfies the requirement itertools (from versions: none)

Hi Sir, I am trying to install itertools ...READ MORE

May 15, 2021 in Python by Bhavana

edited Mar 4 27 views
0 votes
0 answers

How to correlate data in 2 csv files

I am a swim coach. I want ...READ MORE

May 15, 2021 in Python by Lokesh

edited Mar 4 21 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
30,249 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,840 points
16,388 views
0 votes
0 answers

I am trying to execute a python code

def __init__(self, mode=False, maxHands=2, detectionCon=0.5, trackCon=0.5):        ^ IndentationError: ...READ MORE

May 13, 2021 in Python by 9A 43

edited Mar 4 22 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,840 points
13,618 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
13,711 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,840 points
13,856 views
0 votes
0 answers

how can I make this code without built in function(sort,sorted) ?

class KeyIndex:     def __init__(self, a):         self.k = a     def search(self, ...READ MORE

May 11, 2021 in Python by anonymous

edited Mar 4 21 views
0 votes
0 answers

Why can't I use Screen from turtle module ?

TypeError: '_Screen' object is not callable READ MORE

May 9, 2021 in Python by anonymous

edited Mar 4 21 views
0 votes
1 answer

Error:mysql_config not found when installing mysqldb python interface

Hello @kartik, MySQLdb is a python interface for ...READ MORE

May 27, 2020 in Python by Niroj
• 82,840 points
14,965 views
0 votes
0 answers

IndentationError: expected an indented block

I am a beginner and this my ...READ MORE

May 6, 2021 in Python by anonymous

edited Mar 4 23 views