ariankordi / closedverse

Miiverse clone (offdevice) in Django released in late 2017. Not recommended for current use.
21 stars 17 forks source link

Traceback Error #10

Closed stampylongr closed 5 years ago

stampylongr commented 6 years ago

I've disabled debug mode, enabled production mode, got the website set up, but it still won't work. Here's the traceback (which for some odd reason still shows up in the browser):

Traceback (most recent call last):
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 71, in execute
    return self.cursor.execute(query, args)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 250, in execute
    self.errorhandler(self, exc, value)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
    raise errorvalue
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 247, in execute
    res = self._query(query)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 412, in _query
    rowcount = self._do_query(q)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 375, in _do_query
    db.query(q)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/connections.py", line 276, in query
    _mysql.connection.query(self, query)
_mysql_exceptions.ProgrammingError: (1146, "Table 'closedverse.closedverse_main_community' doesn't exist")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/cabox/workspace/closedverse_main/views.py", line 76, in community_list
    'image': request.build_absolute_uri(settings.STATIC_URL + 'img/favicon.png'),
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/shortcuts.py", line 36, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 171, in render
    return self._render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
    return self.nodelist.render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 937, in render
    bit = node.render_annotated(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
    return self.render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
    return self.nodelist.render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 937, in render
    bit = node.render_annotated(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
    return self.render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 937, in render
    bit = node.render_annotated(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
    return self.render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 937, in render
    bit = node.render_annotated(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
    return self.render(context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/defaulttags.py", line 308, in render
    if match:
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/models/query.py", line 272, in __bool__
    self._fetch_all()
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/models/query.py", line 1186, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/models/query.py", line 54, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1065, in execute_sql
    cursor.execute(sql, params)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/utils.py", line 68, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 71, in execute
    return self.cursor.execute(query, args)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 250, in execute
    self.errorhandler(self, exc, value)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
    raise errorvalue
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 247, in execute
    res = self._query(query)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 412, in _query
    rowcount = self._do_query(q)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 375, in _do_query
    db.query(q)
  File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/connections.py", line 276, in query
    _mysql.connection.query(self, query)
django.db.utils.ProgrammingError: (1146, "Table 'closedverse.closedverse_main_community' doesn't exist")
ariankordi commented 5 years ago

Sorry that I've ignored this. You can see at the bottom, there's an underlying error, and it says something like Table 'closedverse.closedverse_main_community' doesn't exist. So, the main problem is that none of the migrations have been done, and no tables have been created. Running python3 manage.py makemigrations closedverse_main and then running python3 manage.py migrate (or you can use python, or pypy, or whatever Python you use) should create and apply the migrations for the models, therefore creating the tables.

Other than that, it seems like nothing else is wrong. If this works, then you'll see an empty community screen, so you'd want to run python3 manage.py createsuperuser to create a super user, and then afterwards log into that.

Although I don't really recommend it, you might probably be interested in running Indigo https://github.com/PF2M/Indigo, if you haven't already tried that at this point.

stampylongr commented 5 years ago

It worked! Thank you so much for your help.