'numpy.float64' object has no attribute 'translate' with Django
<p>Hi I'm using Django and MySQL. When I create a queryset from my MySQL db and try to manipulate it to print it to the screen, I get the following error: </p>

<pre><code>'numpy.float64' object has no attribute 'translate'
</code></pre>

<p>This never used to happen, but I recently changed my computer. </p>

<p>It occurs on the line: </p>

<pre><code>for user in users: 
</code></pre>

<p>Here's the code of the function:</p>

<pre><code>def search(request):
    error = False
    if 'first_name' in request.GET and 'last_name' in request.GET:
        first_name, last_name, location = request.GET['first_name'], request.GET['last_name'], request.GET['location']
        search_query = SearchQuery(date=datetime.datetime.now(),first_name=first_name,last_name=last_name,location=location)
        search_query.save()
        if not first_name or not last_name or not location:
            error = True
            return render(request, 'version_1/search_form.html', {'error': error})
        lat, lon = get_coordinates(location)
        users = User.objects.raw('SELECT *, 69.0 * DEGREES(ACOS(COS(RADIANS(latitude))\
     * COS(RADIANS(%s))\
     * COS(RADIANS(longitude) - RADIANS(%s))\
     + SIN(RADIANS(latitude))\
     * SIN(RADIANS(%s)))) AS distance\
    print users
    for user in users:
        print "here"
        print user
        user.win_rate = calc_win_rate(user.wins, user.losses)
        user.address = user.address.split('\n')[-1]
        try:
            user.rating = (calc_win_rate(user.wins, user.losses)/100.0)**2*10
        except: 
            user.rating = -1
        amended_users.append(user)
    users = sorted(amended_users, key=lambda user: user.win_rate, reverse=True)
    return render(request, 'version_1/search_form.html', {'users': users})
</code></pre>

<p>Any thoughts on what could be going wrong? </p>