Hacker News new | ask | show | jobs
by criddar 5566 days ago
I can't submit anything. Keep getting errors.

Traceback (most recent call last): File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 517, in __call__ handler.post(*groups) File "/base/data/home/apps/ting-1/1.349207370801614578/ting.py", line 203, in post title = unicode(title, "utf-8")) File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 815, in __init__ prop.__set__(self, value) File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 544, in __set__ value = self.validate(value) File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 2437, in validate raise BadValueError('Property %s is not multi-line' % self.name) BadValueError: Property title is not multi-line

1 comments

Thanks for trying. The title of the page you are submitting must have returns before and after it. I try to catch that error with "strip" but for some reason yours is not caught:

    soup = BeautifulSoup.BeautifulSoup(urllib.urlopen(url))
    title = str(soup.html.head.title.string).lstrip("\r\n").rstrip("\r\n")
Try another url.
ok, I fixed the problem. It should work now.