Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8873091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:22:42+00:00 2026-06-14T18:22:42+00:00

I am having a problem with my Google App Engine Program. I have been

  • 0

I am having a problem with my Google App Engine Program. I have been staring at it for a few hours now, and don’t what the solution is.
I have seen another relevant question "BadValueError: Property category is required" on GAE, but even when I remove the “required=True” condition from both the user and USD variables, I receive the same error.

My program does a simple conversion of USD currency to SR currency.
Unfortunately, I keep getting the error:
BadValueError(‘Property %s must be a float’ % self.name)
BadValueError: Property USD must be a float

code from my main.py

import webapp2
from google.appengine.ext import db
from google.appengine.ext.webapp import template

class Convert(db.Model):
    user = db.StringProperty(required=True)
    USD = db.FloatProperty(required=True)
    SR = db.FloatProperty()

class MainHandler(webapp2.RequestHandler):
    def get(self):
        conversion=db.GqlQuery('SELECT * FROM Convert')
        values={'conversion':conversion}
        self.response.out.write(template.render('main.html',values))
    def post(self):
        prog= Convert(user=(self.request.get('userName')),USD=((float)self.request.get('currency'))),SR=((float)(self.request.get('currency')*3.75)))
        prog.put()
        self.redirect('/')

app = webapp2.WSGIApplication([('/', MainHandler)], debug=True)

code from my main.html

    <tr><td>{% for a in conversion%}
        <div align="right" lang="ar"><font size="+1" color="#000000"><strong><font color="#009999">{{a.user}}أدخل:</font>
        {{a.USD}}<font color="#990000">م</font> = {{a.SR}}{% endfor %}
    </td></tr>

    <tr><td>
        <form action="" method="post" accept-charset="utf-8">
            <p align="right" dir="rtl"><strong><font color="#003366">أدخل الدولار الأمريكي:</font></strong><input type="text" name="currency" value="" id="currency"></input></p>
            <p align="right" dir="rtl"><strong><font color="#003366">الرجـاء إدخــال اسمـك:</font></strong><input type="text" name="userName" value="" id="userName"></input></p>
            <p align="right"><input type="submit" value="تحويل العملة"></input></p>
        </form>
    </td></tr>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:22:44+00:00Added an answer on June 14, 2026 at 6:22 pm

    The really odd part is, I renamed the USD, and SR variables to lowercase, and it worked. I don’t know why it insisted the capital USD “Property USD must be a float”, but when I changed them to lowercas usd and sr, it ran smoothly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been following the Google App Engine tutorials, and I'm having a problem with
I am having problems while saving a pre-persisted JDO object in google-app-engine data store.
I am having a problem with the Google annotated timeline. I have this function
Ive been on google all morning and here on SO. The problem im having
Problem with the new App engine connected android application projects for the google eclipse
I'm using Google App Engine to build a website and I'm having problems with
I'm having problems understanding how I would use Google App Engine URL handler mapping
I'm having a problem using the Google Prediction API. I don't know what information
Hey, I'm having a bit of trouble importing m2crypto to google app engine. I
I have developed a dating website built on top of the Google App Engine,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.