Trending questions in Python

0 votes
1 answer

How to delete old image when update ImageField?

Hello @kartik, You'll have to delete the old ...READ MORE

Jun 29, 2020 in Python by Niroj
• 82,840 points
4,736 views
0 votes
1 answer

Solve the quadratic equation using lambda functions in Python

Hello @ Ø§Ù…یرحمزه , from math import sqrt Root = lambda ...READ MORE

Jul 13, 2020 in Python by Niroj
• 82,840 points
4,179 views
0 votes
1 answer

How to extend the User model with custom fields in Django?

Hello @kartik, Define an object manager for your ...READ MORE

Aug 3, 2020 in Python by Niroj
• 82,840 points
3,237 views
0 votes
0 answers

NLPAlgorithm

Hi Everyone, Can anyone please help to find ...READ MORE

Oct 1, 2020 in Python by santhosh
• 120 points
691 views
0 votes
1 answer
0 votes
1 answer

How to print the index of a Pandas Dataframe?

You can do this using the code ...READ MORE

May 13, 2019 in Python by Usha
22,543 views
0 votes
1 answer

ImportError: No module named requests

To install requests module on Debian/Ubuntu for Python2: $ sudo ...READ MORE

Sep 11, 2020 in Python by Deming
1,460 views
0 votes
1 answer

how to use speech_recognition modules as r.listen_in_background()?

Hello Shaurya Thapliyal, Following might be the reason for your error:​ The ...READ MORE

Jun 29, 2020 in Python by Niroj
• 82,840 points
4,755 views
0 votes
1 answer

ImportError: cannot import name 'PILLOW_VERSION' from 'PIL' (unknown location)

Hi@akhtar, I think there is a problem in ...READ MORE

Apr 22, 2020 in Python by MD
• 95,460 points
7,565 views
0 votes
1 answer

How do you serialize a model instance in Django?

Hello @kartik, If you're dealing with a list ...READ MORE

Jun 26, 2020 in Python by Niroj
• 82,840 points
4,738 views
+1 vote
1 answer

How to save image/file through django shell?

Hii @kartik, You will end up with the ...READ MORE

Jun 29, 2020 in Python by Niroj
• 82,840 points
4,479 views
0 votes
1 answer

How to clear a database from the CLI with manage.py in Django?

Hello @kartik, To drop the database and run syncdb again. ...READ MORE

Aug 7, 2020 in Python by Niroj
• 82,840 points
2,817 views
0 votes
1 answer

ValueError: could not broadcast input array from shape (4,1) into shape (4)

Hey @Giorgio, You can try this hope this ...READ MORE

Feb 18, 2020 in Python by Gitika
• 65,770 points
10,319 views
0 votes
1 answer

How to redirect to named url pattern directly from urls.py in django?

Hello @kartik, You can try this: from django.views.generic import ...READ MORE

Aug 12, 2020 in Python by Niroj
• 82,840 points
2,625 views
0 votes
1 answer

ModuleNotFoundError: No module named 'pymc3'

Hi@akhtar, You need to install this module in ...READ MORE

Jun 30, 2020 in Python by MD
• 95,460 points
4,433 views
0 votes
1 answer

How do I install pip on macOS or OS X?

All you have to do is: sudo easy_install ...READ MORE

Sep 11, 2020 in Python by Ahmad Awais
1,244 views
0 votes
2 answers

Tkinter “module not callable” error.

This error statement TypeError: 'module' object is ...READ MORE

Jun 27, 2019 in Python by rahul
• 360 points
21,332 views
0 votes
0 answers

how to show all the Xticks ??

how to show all the Xticks? I have ...READ MORE

Sep 28, 2020 in Python by dhoni
• 120 points
509 views
0 votes
0 answers

Real time RGB graph from video

Hi!  I need to create a graphic ...READ MORE

Sep 16, 2020 in Python by Leonardo
• 120 points
1,049 views
+1 vote
0 answers

ValueError: operands could not be broadcast together with shapes (3,) (1000,)

This is the part of my code, why ...READ MORE

May 17, 2020 in Python by anonymous
• 220 points

edited May 18, 2020 by Gitika 6,235 views
0 votes
0 answers

How the safe Data(Plain Text) from Python Request to CSV

Hello I'm new at python and trying to ...READ MORE

Sep 2, 2020 in Python by SleeperSimulant
• 120 points
1,609 views
+1 vote
1 answer

How to convert a PIL Image into a numpy array?

Hello @kartik, You just need to convert your ...READ MORE

Jun 22, 2020 in Python by Niroj
• 82,840 points
4,603 views
0 votes
1 answer

How can I enable CORS on Django REST Framework?

Hello @kartik, Take the following steps to enable ...READ MORE

Jun 30, 2020 in Python by Niroj
• 82,840 points
4,260 views
0 votes
2 answers

Get key by value in dictionary

I have slightly modified your program to ...READ MORE

Nov 25, 2021 in Python by Python Coder
1,029 views
0 votes
1 answer

how to create a password in python 1 alphabet 1 digit 1character

You can make use of this:  ^(?=.*[a-zA-Z])(?=.*\d)(?=.*[!@#$%^&*()_+])[A-Za-z\d][A-Za-z\d!@#$%^&*()_+]{7,19}$ [A-Za-z\d] Ensures that ...READ MORE

Sep 18, 2020 in Python by Roshni
• 10,480 points
805 views
0 votes
1 answer

Where I am doing wrong?

Hello @Sana, Lines 3, 6-8 look very sketchy.Here ...READ MORE

Sep 7, 2020 in Python by Niroj
• 82,840 points
1,308 views
0 votes
1 answer

Python error "UnboundLocalError: local variable 'x' referenced before assignment"

You get this error because when you ...READ MORE

Jul 24, 2019 in Python by Greg
18,990 views
0 votes
1 answer

Failed building wheel for wordcloud #105

If you are running Python 3.5 you ...READ MORE

Sep 14, 2020 in Python by Gitika
• 65,770 points
910 views
0 votes
1 answer

In Django Admin how do I disable the Delete link?

Hello @kartik, Simple you can use this code: class ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,840 points
2,303 views
0 votes
1 answer

How do I set custom HTML attributes in django forms?

Hello @kartik, You can change the widget on ...READ MORE

Jul 29, 2020 in Python by Niroj
• 82,840 points
2,946 views
0 votes
1 answer

'tuple' object is not callable

Hey, @There, This kind of error happens once ...READ MORE

Aug 13, 2020 in Python by Rajiv
• 8,870 points
2,336 views
0 votes
0 answers

But when I run this, I get NameError: name 'alphabeta' is not defined error. How to solve this?

tree = [[[5, 1, 2], [8, -8, ...READ MORE

Sep 6, 2020 in Python by MUHAMMAD
• 160 points

retagged Sep 7, 2020 by Gitika 1,321 views
0 votes
1 answer

Error: “ 'dict' object has no attribute 'iteritems' ”?

Hii, In Python2, dictionary.iteritems() is more efficient than ...READ MORE

Apr 13, 2020 in Python by Niroj
• 82,840 points
7,523 views
0 votes
1 answer

Module turtle has no listen member and module turtle has no onley member

Hi, @Edureka Are you facing this above mentioned ...READ MORE

Sep 15, 2020 in Python by Gitika
• 65,770 points
833 views
0 votes
1 answer

How to run Django's test database only in memory?

Hello @kartik, If you set your database engine ...READ MORE

Jun 24, 2020 in Python by Niroj
• 82,840 points
4,358 views
0 votes
1 answer

How can I find the union of two Django querysets?

Hello @kartik, Try this: records = query1 | query2 If ...READ MORE

Aug 7, 2020 in Python by Niroj
• 82,840 points
2,430 views
0 votes
1 answer

Error:annot apply DjangoModelPermissions on a view that does not have `.queryset` property or overrides the `.get_queryset()` method

Hello @kartik, You probably have set DjangoModelPermissions as a default ...READ MORE

Jun 25, 2020 in Python by Niroj
• 82,840 points
4,271 views
0 votes
1 answer

CAn i have source code of image steganography please

Least Significant Bit (LSB) is a technique in which ...READ MORE

Sep 7, 2020 in Python by Roshni
• 10,480 points
1,054 views
0 votes
1 answer

How to upload a file in Django?

Hello @kartik, A minimal Django file upload example 1. ...READ MORE

Aug 3, 2020 in Python by Niroj
• 82,840 points
2,565 views
0 votes
1 answer

how to get anova table of split plot design in python

Hello @kapil, A split plot design is a ...READ MORE

Aug 24, 2020 in Python by Niroj
• 82,840 points
1,663 views
0 votes
1 answer

Error:Django connection to PostgreSQL: “Peer authentication failed”

Hello @kartik, My settings.py did not have a ...READ MORE

Aug 12, 2020 in Python by Niroj
• 82,840 points
2,139 views
0 votes
1 answer

How to strip html/javascript from text input in django?

Hello @kartik, Django provides an utility function to ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,840 points
1,910 views
0 votes
1 answer

Is there a way to store this text in a list using selenium (python)

Try using this code snippet to resolve ...READ MORE

Aug 24, 2020 in Python by Carlos
1,609 views
+1 vote
1 answer

understand this error:AttributeError: 'Turtle' object has no attribute 'Listen'. Any ideas?

Hey, @Mohammed, You are getting this error because ...READ MORE

May 20, 2020 in Python by Gitika
• 65,770 points
5,699 views
0 votes
1 answer

question related to python laungauge

Hi, @XYZGOD, Python has a  built-in input() function ...READ MORE

Sep 15, 2020 in Python by Gitika
• 65,770 points
609 views
0 votes
1 answer

ImportError: cannot import name find_spec” when I start a new Django project?

Hello @kartik, find_spec isn't available in Python 3.2.3; it ...READ MORE

Aug 5, 2020 in Python by Niroj
• 82,840 points
2,348 views
0 votes
1 answer

print the character from string if character is alphabet

You can use str.isalpha() For example: s = 'a123b' for ...READ MORE

Sep 18, 2020 in Python by Roshni
• 10,480 points
455 views
0 votes
0 answers

How to handle notifications in Python with selenium windows Chrome Webdriver

Good day, I am kid trying to ...READ MORE

Sep 11, 2020 in Python by Kgohlopo
• 120 points
771 views
0 votes
0 answers

How to draw nested squares to create pursuit curves?

Draw nested squares to create pursuit curves. ...READ MORE

Aug 16, 2020 in Python by Andwela
• 120 points
1,795 views
0 votes
1 answer

Error:No module named pkg_resources

Hello @kartik, This error occur if the requirements.txt contains a ...READ MORE

Jun 26, 2020 in Python by Niroj
• 82,840 points
3,944 views