EdjeElectronics / TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

How to train a TensorFlow Object Detection Classifier for multiple object detection on Windows
Apache License 2.0
2.92k stars 1.3k forks source link

int() argument must be a string, a bytes-like object or a number, not 'NoneType' #521

Open shalmaliam opened 4 years ago

shalmaliam commented 4 years ago

I am just trying to make a website that calculates force=mass*accleration I have tried adding int it gives, string error or some base 10 error. #mass=int(request.GET['mass']) ...this too gives an error & all the variations of it!!!

views.py


from django.shortcuts import render

def home(request):
    return render(request, 'home.html')

def calculator1(request):
    mass = request.GET.get('mass')
    acc = request.GET.get('acc')
    print(mass)
    print(acc)
    force=mass*acc
    return render(request, 'calculator1.html', {'result':force})```
urls.py

```from django.contrib import admin
from django.urls import path
from . import views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', views.home, name='home'),
    path('calculator1', views.calculator1, name='calculator1'),
    ]```
calculator.html(a part of it)

```<a href="#" class="list-group-item list-group-item-action">
            <div class="d-flex w-100 justify-content-between">
                <h5 class="mb-1">Newton's Second Law of Motion</h5>
            </div>
                <form action="calculator1" method="get">
                Force = mass * accleration<br>
                mass = <input type="text" name="mass" size="7"><br>
                accleration = <input type="text" name="acc" size="7"><br>
            </form>
        force = {{result}}
    </a>
    <button type="submit" class="btn btn-dark">Calculate</button><br>
</div>```
*help pleaseeee