Trending questions in Python

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,880 points
4,410 views
0 votes
2 answers

How do play audio (playsound) in background of Python script?

There’s an optional second argument, block, which ...READ MORE

Jun 8, 2019 in Python by anonymous
26,920 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,880 points
2,374 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
353 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
878 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,440 points
7,155 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
995 views
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,880 points
4,152 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,386 views
0 votes
1 answer

ERROR: No matching distribution found for cPickle

Hi@akhtar, There is no cPickle in Python 3. Just import pickle ...READ MORE

Jul 14, 2020 in Python by MD
• 95,440 points
3,498 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,002 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,880 points
2,450 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,880 points
4,235 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,520 points
641 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,910 points
9,934 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,880 points
4,051 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,910 points
726 views
0 votes
1 answer
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,910 points
743 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,880 points
3,508 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,880 points
3,987 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,520 points
913 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,651 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,005 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,880 points
1,969 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,910 points
2,010 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,880 points
914 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,880 points
2,594 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
599 views
0 votes
1 answer

question related to python laungauge

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

Sep 15, 2020 in Python by Gitika
• 65,910 points
486 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,520 points
324 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,880 points
2,102 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,440 points
3,739 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,880 points
2,293 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
612 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,880 points
1,624 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,880 points
1,826 views
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
21,581 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,880 points
3,914 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,880 points
3,948 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,880 points
7,001 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,880 points
2,062 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
20,575 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,191 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,880 points
1,221 views
0 votes
1 answer

How to capture URL parameters in request.GET

Hello @kartik, When a URL is like domain/search/?q=haha, you ...READ MORE

Aug 6, 2020 in Python by Niroj
• 82,880 points
1,982 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,498 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,880 points
3,674 views
0 votes
1 answer

How to convert JSON data into a Python object?

Hello @kartik, You can do it in one ...READ MORE

Aug 3, 2020 in Python by Niroj
• 82,880 points
1,969 views
0 votes
0 answers

How to write this condition in one line and run this.

Hello, I have a dataframe that contain ...READ MORE

Sep 7, 2020 in Python by moli
• 140 points
462 views