SavandBros / badge

Badges for your site to display cool badges for your projects such as downloads, license, status, ...
http://badge.kloud51.com
GNU General Public License v3.0
16 stars 3 forks source link

AUR popularity/num_votes should set str and not int directly #36

Closed Alir3z4 closed 8 years ago

Alir3z4 commented 8 years ago

Error:

        Traceback (most recent call last):
          File "/home/alireza/.virtualenvs/badge/lib/python2.7/site-packages/twisted/web/server.py", line 234, in render
            body = resrc.render(self)
          File "/home/alireza/.virtualenvs/badge/lib/python2.7/site-packages/klein/resource.py", line 201, in render
            d = defer.maybeDeferred(_execute)
          File "/home/alireza/.virtualenvs/badge/lib/python2.7/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
            result = f(*args, **kw)
          File "/home/alireza/.virtualenvs/badge/lib/python2.7/site-packages/klein/resource.py", line 195, in _execute
            **kwargs)
        --- <exception caught here> ---
          File "/home/alireza/.virtualenvs/badge/lib/python2.7/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
            result = f(*args, **kw)
          File "/home/alireza/.virtualenvs/badge/lib/python2.7/site-packages/klein/app.py", line 108, in execute_endpoint
            return endpoint_f(self._instance, *args, **kwargs)
          File "/home/alireza/.virtualenvs/badge/lib/python2.7/site-packages/klein/app.py", line 193, in _f
            return _call(instance, f, request, *a, **kw)
          File "/home/alireza/.virtualenvs/badge/lib/python2.7/site-packages/klein/app.py", line 33, in _call
            return f(*args, **kwargs)
          File "/home/alireza/dev/pycharm/badge/badge/views.py", line 56, in service_badge
            img = service_class.draw_badge()
          File "/home/alireza/dev/pycharm/badge/service/base.py", line 89, in draw_badge
            return draw.as_svg() if self.format == 'svg' else draw.as_png()
          File "/home/alireza/dev/pycharm/badge/painter/draw.py", line 122, in as_svg
            total_width=self.get_total_width(),
          File "/home/alireza/dev/pycharm/badge/painter/draw.py", line 100, in get_total_width
            self.total_width = (self.get_key_width() + self.get_value_width())
          File "/home/alireza/dev/pycharm/badge/painter/draw.py", line 89, in get_value_width
            self.get_value_text_width() +
          File "/home/alireza/dev/pycharm/badge/painter/draw.py", line 68, in get_value_text_width
            self.value_text_width = self.get_text_width(self.value_text)
          File "/home/alireza/dev/pycharm/badge/painter/draw.py", line 111, in get_text_width
            font_metrics = painter.get_font_metrics(self._canvas, text=text)
          File "/home/alireza/.virtualenvs/badge/lib/python2.7/site-packages/wand/drawing.py", line 1915, in get_font_metrics
            raise TypeError('text must be a string, not ' + repr(text))
        exceptions.TypeError: text must be a string, not 4.381746