urlopen() returns not a string but a file-like object, see
http://docs.python.org/library/urllib2.html
So you first need to read that file and pass the result to the render()
method.
-- Christian
>
> Errors:
>
> File "/Library/Python/2.5/site-packages/tornado/web.py", line 688, in
> _execute
> getattr(self, self.request.method.lower())(*args, **kwargs)
> File "myapp.py", line 207, in get
> self.render(response)
> File "/Library/Python/2.5/site-packages/tornado/web.py", line
> 301, in render
> html = self.render_string(template_name, **kwargs)
> File "/Library/Python/2.5/site-packages/tornado/web.py", line
> 387, in render_string
> t = RequestHandler._templates[template_path].load
> (template_name)
> File "/Library/Python/2.5/site-packages/tornado/template.py",
> line 182, in load
> path = os.path.join(self.root, name)
> File "/System/Library/Frameworks/Python.framework/Versions/2.5/
> lib/python2.5/posixpath.py", line 60, in join
> if b.startswith('/'):
> AttributeError: addinfourl instance has no attribute 'startswith'
>
>
> Thanks,
> Rob
--
Christian Scholz Homepage: http://comlounge.net
COM.lounge GmbH blog: http://mrtopf.de/blog
Hanbrucher Str. 33 Skype: HerrTopf
52064 Aachen Video Blog: http://comlounge.tv
Tel: +49 241 400 730 0 E-Mail c...@comlounge.net
Fax: +49 241 979 00 850 IRC: MrTopf, Tao_T
neuer Podcast: Der OpenWeb-Podcast (http://openwebpodcast.de)
new podcast: Data Without Borders (http://datawithoutborders.net)