Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unsupported operand type(s) for +: 'int' and 'str' #11

Open
regner opened this issue Nov 4, 2014 · 2 comments
Open

TypeError: unsupported operand type(s) for +: 'int' and 'str' #11

regner opened this issue Nov 4, 2014 · 2 comments
Labels

Comments

@regner
Copy link

regner commented Nov 4, 2014

If your layout config has a tile_id that is just numbers the yaml loading inturpurts it as an int and fails later when it attempts to concatenate two strings.

details:
    page_title: eve_dev_overview
layout:
    - row_1_of_1:
        - col_1_of_1:
            - tile_template: just_value
              tile_id: 01
              title: Hanna (Phoebe) Staging
[E 141104 11:38:08 web:1121] Uncaught exception GET /eve_dev_overview (10.0.2.2)
    HTTPRequest(protocol='http', host='localhost:8080', method='GET', uri='/eve_dev_overview', version='HTTP/1.1', remote_ip='10.0.2.2', body='', headers={'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip, deflate, sdch', 'Host': 'localhost:8080', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2194.2 Safari/537.36', 'Connection': 'keep-alive', 'Cookie': '_pk_id.1.1fff=1c97657ca0dbe4ec.1410793043.8.1414163246.1412801664.', 'Cache-Control': 'max-age=0'})
    Traceback (most recent call last):
      File "/home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tornado/web.py", line 1077, in _execute
        *self.path_args, **self.path_kwargs)
      File "/home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tipboard/app.py", line 225, in get
        tile_path=_tile_path,
      File "/home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tornado/web.py", line 524, in render
        html = self.render_string(template_name, **kwargs)
      File "/home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tornado/web.py", line 631, in render_string
        return t.generate(**namespace)
      File "/home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tornado/template.py", line 270, in generate
        return execute()
      File "layout_html.generated.py", line 95, in _execute
        timeout=tile.get('timeout', ''),
      File "/home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tornado/web.py", line 1130, in render
        rendered = self._active_modules[name].render(*args, **kwargs)
      File "/home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tornado/web.py", line 1985, in render
        **kwargs)
      File "/home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tornado/web.py", line 1940, in render_string
        return self.handler.render_string(path, **kwargs)
      File "/home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tornado/web.py", line 631, in render_string
        return t.generate(**namespace)
      File "/home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tornado/template.py", line 270, in generate
        return execute()
      File "/home/vagrant/tipboard/tb-env/local/lib/python2_7/site-packages/tipboard/tiles/just_value_html.generated.py", line 17, in _execute
        _tmp = tile_id + '-title'  # /home/vagrant/tipboard/tb-env/local/lib/python2.7/site-packages/tipboard/tiles/just_value.html:6
    TypeError: unsupported operand type(s) for +: 'int' and 'str'
@xor-xor
Copy link
Contributor

xor-xor commented Nov 17, 2014

Thanks for reporting! Yes, we are aware of that and we are going to fix this issue. By that time just don't use ids starting with numbers 😉

@regner
Copy link
Author

regner commented Nov 17, 2014

:) Yea, for now I just updated the ID to be a string.

@xor-xor xor-xor added the bug label Nov 19, 2014
@xor-xor xor-xor removed their assignment Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants