Forums

Operational Error No Such Table

my site runs fine on my local envir, but no longer runs on the web. I get the following error, I was in my virtual when created the db. You can look at my code if you need to, says error is thrown on line 25. Thanks

OperationalError at /post/1/ no such table: blog_comment Request Method: GET Request URL: http://mekobes44.pythonanywhere.com/post/1/ Django Version: 1.9.8 Exception Type: OperationalError Exception Value:
no such table: blog_comment Exception Location: /home/Mekobes44/First-Python-Blog/myvenv/lib/python3.5/site-packages/django/db/backends/sqlite3/base.py in execute, line 323 Python Executable: /usr/local/bin/uwsgi Python Version: 3.5.1 Python Path:
['/var/www', '.', '', '/var/www', '/home/Mekobes44/First-Python-Blog/myvenv/lib/python3.5', '/home/Mekobes44/First-Python-Blog/myvenv/lib/python3.5/plat-x86_64-linux-gnu', '/home/Mekobes44/First-Python-Blog/myvenv/lib/python3.5/lib-dynload', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/home/Mekobes44/First-Python-Blog/myvenv/lib/python3.5/site-packages', '/home/Mekobes44/First-Python-Blog'] Server time: Sat, 13 Aug 2016 16:25:09 -0400

no such table: blog_comment 15 {% else %} 16 <a href="{% url 'login' %}" class="top-menu"><span class="glyphicon glyphicon-lock"></span></a> 17 {% endif %} 18 <h1>{{ post.title }}</h1> 19 <p>{{ post.text|linebreaksbr }}</p> 20 <a href="{% url 'blog.views.post_detail' pk=post.pk %}">Comments: {{ post.approved_comments.count }}</a> 21
22 </div> 23 <hr> 24 <a class="btn btn-default" href="{% url 'add_comment_to_post' pk=post.pk %}">Add comment</a> 25 {% for comment in post.comments.all %} 26 {% if user.is_authenticated or comment.approved_comment %} 27 <div class="comment"> 28 <div class="date"> 29 {{ comment.created_date }} 30 {% if not comment.approved_comment %} 31 <a class="btn btn-default" href="{% url 'comment_remove' pk=comment.pk %}"><span class="glyphicon glyphicon-remove"></span></a> 32 <a class="btn btn-default" href="{% url 'comment_approve' pk=comment.pk %}"><span class="glyphicon glyphicon-ok"></span></a> 33 {% endif %} 34 </div> 35 <strong>{{ comment.author }}</strong>

When you say no longer runs on the web. Did it at some point run correctly? That error sounds like you don't have a table created. (ie. you needed to run syncdb etc)