Latest Questions tagged Python 3.x

Browse all latest questions tagged Python 3.x

16
Votes
Published 01 May, 2022
Python - Tkinter window says (not responding) but code is running

I have a program that runs a long process after you click an action button. As the process is running the root window will say that it is not responding even though I know the program is running in t...

16
Votes
Published 04 May, 2022
Python - Getting Error 403 in Google Colab with Tensorboard with Firefox

I have a tfevent file already present on my Drive and I have successfully connected it to Google Colab. After searching within the issues of Tensorboard Github, I found that I had to set dom.serviceWo...

54
Votes
Published 28 Jun, 2022
Python - ValueError: Invalid RGBA argument: 'rgbkymc'

train_class = train_df['Class'].value_counts().sortlevel() my_colors = 'rgbkymc' #red, green, blue, black, etc. train_class.plot(kind='bar', color=my_colors) plt.grid() plt.show() I'm getting: Val...

66
Votes
Published 27 Aug, 2022
Python - gTTS error: saving as wav but saved as MPEG

Trying to convert the text to speech and save as wav file using gTTS module. my code: import gTTS text = "This is my text in the saving folder" tts = gTTS(text) tts.save('sample.wav') The file i...

15
Votes
Published 01 May, 2022
Python - Explicitly Define Datatype in Python Function

I want to define 2 variables in python function and define them as float explicitly. However, when i tried to define them in the function parameter, it's showing syntax error. Please help me get the...

55
Votes
Published 26 Apr, 2022
Python - Pip - Fatal error in launcher: Unable to create process using '"'

I installed python 3.5.1 via ampps and it's working. However, when i try to use pip, i get the following message: Fatal error in launcher: Unable to create process using '"' I already reinstalled a...

71
Votes
Published 27 Aug, 2022
Python - Find rows of dataframe with the same column value in Pandas

Consider a dataframe with 2 columns for easiness. The first column is id and it is the key. The second column, named code is not a key but the case of two entries having the same value is very rare....

3
Votes
Published 29 Apr, 2022
Python - How to insert a value into SQLAlchemy TIMESTAMP column

I am trying to set value for timestamp column using SQLAlchemy, but I experience following error: column "timestamp" is of type timestamp without time zone but expression is of type numeric My tabl...

79
Votes
Published 20 Oct, 2022
Java - IllegalArgumentException: 'Unsupported class file major version 55'

I was doing the assignment of "advanced machine learning and signal processing" in Coursera. I get the encountered with this error "Py4JavaEror". This is the first assignment of this course. It was s...

22
Votes
Published 29 Aug, 2022
Python - Vectorize Sequences explanation

Studying Deep Learning with Python, I can't comprehend the following simple batch of code which encodes the integer sequences into a binary matrix. def vectorize_sequences(sequences, dimension=10000)...

6
Votes
Published 24 Apr, 2022
Python - Running pyinstaller another pc with Chromedriver

I am trying to add Chromedriver inside an executable in pyinstaller. While this is possible it seems that I get the below error message when trying to run this on another computer. I have tried a nu...

2
Votes
Published 01 May, 2022
Python - “zsh: illegal hardware instruction python” when Tensorflow on macbook pro M1

I've followed every step of this question Install a venv: python3 -m venv venv. drag the install_venv.sh (which is located within the downloaded folder) file to the terminal, add -p at the end. select...

13
Votes
Published 29 Aug, 2022
Python - Why does Python allow out-of-range slice indexes for sequences?

So I just came across what seems to me like a strange Python feature and wanted some clarification about it. The following array manipulation somewhat makes sense: p = [1,2,3] p[3:] = [4] p = [1,...

36
Votes
Published 26 Apr, 2022
Python - How to use 'User' as foreign key in Django 1.5

I have made a custom profile model which looks like this: from django.db import models from django.contrib.auth.models import User class UserProfile(models.Model): user = models.ForeignKey('User...

16
Votes
Published 27 Aug, 2022
Python - Can I import modules from thread in Python?

It all began last night when I was making a script that required 8 or so packages including pygame.mixer which on my computer importing this takes a few seconds. This meant that before the script e...