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
667 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,410 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,160 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
668 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
821 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
692 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
838 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
474 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
675 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
3,993 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
646 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,440 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,536 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,445 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
574 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,129 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,276 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
633 views
0 votes
0 answers

How to convert html to pdf in django

Sep 21, 2020 in Python by karthik
• 120 points
1,542 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,244 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,681 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,496 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,261 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
527 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,861 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
427 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
724 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
692 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,249 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,662 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
5,953 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
639 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
4,957 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,364 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,144 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
559 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,678 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,154 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,630 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
530 views
0 votes
0 answers
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,349 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,141 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,869 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
504 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,635 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 809 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,606 views