Skip to content

Unsupported operand types ‘NoneType’

I am very new to Python, and I’m trying to create a software that calculates a series of equations and I keep running into an error. This is the code: My goal is that the code runs these equations until v_i equals 0, while populating the lists with the relevant results, then throwing all the information…

Multiple models in Django form

I have the following models: I’d like to create a front-end form which allows a user to review a coach, including a rating for some pre-populated categories. In my head, the form would look something like: I’ve seen Django Formsets in the documentation but these appear to exist for creating multip…

How to print every error using try except in python

I’m now learning how to handle multiple errors in python. While using try-except I want to print every error in try. There are two errors in try but the indexing error occurred first, so the program can’t print a message about ZeroDivisionError. How can I print both IndexErrormessage and ZeroDivis…

Installing pip is not working in python < 3.6

I am trying to use these steps with bitbucket CI to deploy an application: However, the python get-pip.py step fails with this error: Why isn’t it working now? Does it depend on the operating system? For the equivalent issue with upgrading pip in old Python installations, see Upgrading pip fails with sy…