Trending questions in Python

0 votes
1 answer

ModuleNotFoundError: No module named 'pyperclip

Hi@akhtar, You may get this error if this ...READ MORE

Jun 23, 2020 in Python by MD
• 95,460 points
5,784 views
0 votes
1 answer

cmd showing the interpreter error and version 3.7 showing?

You can add python3.8 in the environment ...READ MORE

Oct 14, 2020 in Python by anonymous
• 65,770 points
842 views
0 votes
1 answer

FileNotFound error

PATH is an issue here. It should ...READ MORE

Oct 16, 2020 in Python by anonymous
• 65,770 points
742 views
0 votes
1 answer

Error:urllib and “SSL: CERTIFICATE_VERIFY_FAILED”

Hello @kartik, Insert this code at the beginning ...READ MORE

Jun 5, 2020 in Python by Niroj
• 82,840 points
6,482 views
0 votes
1 answer

SyntaxError: invalid syntax in inline function.

Hi@akhtar, You need to write your if-else code ...READ MORE

Oct 5, 2020 in Python by MD
• 95,460 points
1,231 views
0 votes
1 answer

banking marketing domain

Hi, @Ghazala, What is your exact query here? ...READ MORE

Oct 12, 2020 in Python by Gitika
• 65,770 points
955 views
0 votes
1 answer

Reverse a string in Python

You should try to use the following ...READ MORE

Feb 8, 2022 in Python by Rahul
• 9,680 points
758 views
0 votes
1 answer
0 votes
1 answer

How to create login user using Django Rest Framework?

Hello @Reebika , For you query you can refer ...READ MORE

Oct 12, 2020 in Python by Niroj
• 82,840 points
875 views
0 votes
1 answer

How to install voice recognizer in python?

You can install the Speech Recognition library ...READ MORE

Oct 15, 2020 in Python by anonymous
• 65,770 points
715 views
0 votes
1 answer

Error:Invalid http_host header

Hello @kartik, The error log is straightforward. As ...READ MORE

Jun 30, 2020 in Python by Niroj
• 82,840 points
5,334 views
0 votes
1 answer

How to pre-populate FormView with dynamic data?

Hello @kartik, You can override the FormView class's ...READ MORE

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

Can anyone explain me this error?

It is an Indentation error. There should be ...READ MORE

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

Error executing Jupyter command 'notebook': [Errno 2] No such file or directory

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

Jun 25, 2020 in Python by MD
• 95,460 points
5,526 views
0 votes
1 answer

El return solo me devuelve False en este método

Hola amiga como estas La función no devuelve ...READ MORE

Oct 19, 2020 in Python by Gitika
• 65,770 points
517 views
0 votes
1 answer

Error:Can't connect to local MySQL server through socket '/tmp/mysql.sock

Hello @kartik, Try the code below: sudo /usr/local/mysql/support-files/mysql.server start ...READ MORE

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

What is the best way to remove accents in a Python unicode string?

Hello @kartik, Some languages have combining diacritics as ...READ MORE

May 11, 2020 in Python by Niroj
• 82,840 points
7,418 views
0 votes
1 answer

Which is the best software for python?

For the python idle 3.8 it's better ...READ MORE

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

how do i use the enumerate function inside a list?

Enumerate() method adds a counter to an ...READ MORE

Nov 16, 2021 in Python by Ruhan Siddiqui
3,377 views
0 votes
0 answers

How to convert html to pdf in django

Sep 21, 2020 in Python by karthik
• 120 points
1,638 views
0 votes
1 answer

AttributeError: __enter__

Hey, @Archisman, in case of this: with sr.Microphone as ...READ MORE

Aug 24, 2020 in Python by Gitika
• 65,770 points
2,808 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
27,878 views
0 votes
1 answer

How to install biopyhton if import is not recognised as a command by the system?

Hello, For install biopyhton with proper instruction you can ...READ MORE

Oct 12, 2020 in Python by Niroj
• 82,840 points
688 views
0 votes
1 answer

AttributeError: 'numpy.ndarray' object has no attribute 'append'

Hi@Nilesh, You created two empty lists. And in ...READ MORE

Aug 11, 2020 in Python by MD
• 95,460 points
3,374 views
0 votes
2 answers

How to upgrade all Python packages with pip?

Open the command prompt and check the ...READ MORE

Jun 7, 2020 in Python by sahil
• 500 points
6,134 views
0 votes
1 answer

How to call a function from another file in Python?

Hi@akhtar, You can use the import keyword to ...READ MORE

Jun 24, 2020 in Python by MD
• 95,460 points
5,417 views
+1 vote
1 answer

How do I return JSON without using a template in Django?

Hello @kartik, In the case of the JSON ...READ MORE

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

ModuleNotFoundError: No module named 'tools.nnwrap'

Hi@akhtar, I think you didn't install the torch ...READ MORE

Jun 29, 2020 in Python by MD
• 95,460 points
5,149 views
0 votes
1 answer

How to create a generic serializer with a dynamic model in Meta?

Hello @kartik, You can do that by following: serializers.py class ...READ MORE

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

I am unable to import pyttsx2 in python. Python is throwing exception ModuleNotFoundError.

Hey, @Athrava Gulve, Hey, @Atharva, Which version of Python your ...READ MORE

Oct 7, 2020 in Python by Gitika
• 65,770 points
816 views
0 votes
1 answer

Can someone tell me what this line of code does?

Hey, Your above-asked query means: Confidence loads one ...READ MORE

Oct 12, 2020 in Python by Gitika
• 65,770 points
573 views
0 votes
1 answer

What does this Class bicycle(bicycle) actually mean?

A Python class is for defining a ...READ MORE

Oct 7, 2020 in Python by Gitika
• 65,770 points
783 views
0 votes
1 answer

.What is the meaning of "while True :" while doing in a loop.

The body of the loop will continue ...READ MORE

Oct 7, 2020 in Python by Gitika
• 65,770 points
782 views
0 votes
1 answer

How can we initialise a variable like this a = -2.331*(e**-16)?

Remove stars and brackets. That's all READ MORE

Oct 14, 2020 in Python by anonymous
• 65,770 points
468 views
0 votes
1 answer

I tried to install this pip cryptography in Pycharm but I'm getting an error

Hello @Dilpreet , Have you tried updating pip version? ...READ MORE

Aug 4, 2020 in Python by Niroj
• 82,840 points
3,539 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,460 points
4,401 views
0 votes
1 answer

How to create Pytest report in html format?

Hi@akhtar, You can create a Pytest report in ...READ MORE

Jun 24, 2020 in Python by MD
• 95,460 points
5,292 views
0 votes
1 answer

How to change the file name of an uploaded file in Django?

Hello @kartik, The basic way is import os os.rename('a.txt', 'b.html') For ...READ MORE

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

How do I do a not equal in Django queryset filtering?

Hello @kartik, Try this code below: >>> from myapp.models ...READ MORE

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

How can I unit test django messages?

Hello @kartik, Try use: response = self.client.post('/foo/') messages = list(response.context['messages']) self.assertEqual(len(messages), ...READ MORE

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

Everything in python is object?

it means your variables are also object ...READ MORE

Oct 7, 2020 in Python by Gitika
• 65,770 points
602 views
0 votes
1 answer

Weird Function Using python

input_str = input() input_list = input_str.split(',') a = int(input_list[0]) b ...READ MORE

Jul 28, 2020 in Python by Vin
4,465 views
0 votes
1 answer

How can I send trace messages to the console (like print) when I'm running my Django app under manage.py runserver?

Hello @kartik, Text printed to stderr will show ...READ MORE

Aug 12, 2020 in Python by Niroj
• 82,840 points
2,996 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,328 views
0 votes
1 answer

Why self is used in methods or init() method in python?

its a constructor like in C++. In c++ ...READ MORE

Oct 6, 2020 in Python by Gitika
• 65,770 points
606 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,840 points
4,878 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,727 views
0 votes
1 answer

What to do ?

Hello @Aashi, pd_csv.(...) the dot after csv For more information ...READ MORE

Oct 6, 2020 in Python by Niroj
• 82,840 points
598 views