Trending questions in Python

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
694 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,437 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,185 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
686 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
714 views
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
839 views
0 votes
1 answer
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
871 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
707 views
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,619 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
494 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,020 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
693 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,474 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,481 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,195 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
602 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,324 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
650 views
0 votes
0 answers

How to convert html to pdf in django

Sep 21, 2020 in Python by karthik
• 120 points
1,572 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,295 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,719 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,523 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,287 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,879 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
764 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
539 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,734 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,312 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
437 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,011 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
712 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,019 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
672 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,417 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,189 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,248 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
569 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,715 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,687 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,403 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
565 views
0 votes
0 answers
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,905 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,684 views
0 votes
1 answer

How to Creat a JSON response using Django and Python?

Hello @kartik, I usually use a dictionary, not ...READ MORE

Aug 6, 2020 in Python by Niroj
• 82,840 points
3,159 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
539 views
0 votes
2 answers

WHY IS IT SHOWING THIS ERROR?

Hello @shrood , If you are trying to find ...READ MORE

Jul 24, 2020 in Python by Niroj
• 82,840 points
3,671 views
0 votes
0 answers

TypeError: unsupported operand type(s) for *: 'CommentedMap' and 'CommentedMap' Hatam bu nasıl çözebilirim ?

from ruamel import yaml from scipy import spatial import ...READ MORE

Sep 29, 2020 in Python by anonymous
• 120 points

edited Sep 29, 2020 by Gitika 830 views