Skip to content

Flask App Deployment: Internal Server Error

I recently tried to deploy a flask app using Heroku. However, I encountered an internal server error. My code can be found here: https://github.com/chaneth8/Task_List. This is the message that appeared on my log in Heroku – what could the error be? Thanks in advance. Answer I studied your code and hoste…

In a Python Flask JWT, what is `sub`?

Here is an example JWT generated using the Flask-JWT-Extended library in Python 3: I can find documentation on all of these key/value pairs, except for sub. What is it? Answer According to the JWT spec, sub is a Subject claim: The “sub” (subject) claim identifies the principal that is the subject …

Tk Filedialog giving back a tuple

I am trying to take a file and put it into all directories 1 level down. I thought that this would be simple, what am I doing wrong? Answer Since it is “askopenfilenames”, it returns the results in the form of a tuple. You can iterate over it and move the files to the directory selected:

Merging 2 different DataFrame with different length

I have two DataFrame Consists of time and price columns. I want to create a new DataFrame df3 as the length of df2, and I also want to put df1[‘price’] in it like below Where price1 shows the mean of price1 values for the corresponding time2 values like below I’m sorry if it’s unclear,…

Use slider to choose which graph to show

Suppose I want to show three simulations by reading three .xlsx files. Next, I want to design a slider to choose which simulation to show. If I move the slider to 0, then 0 will be the input to the function “update()”. The first simulation will be shown. The following is the code: If I move the sl…