Q&A
책을 따라하다가 막히는 부분이 있나요?
질문을 남겨주세요.
하지만, 책을 끝까지 읽고 나면 이 페이지도 만드실 수 있을거에요.
p.451 구글 로그인 관련 질문입니다
2 years, 7 months ago
ghtks1012social application 추가를 하려고 하면 이러한 오류가 뜨는데 어떻게 해야할까요? 혹시 마이그레이션 다 밀고 처음부터 마이그레이션을 다시 해야 하나요?
[24/Mar/2022 16:39:00] "GET /admin/socialaccount/socialapp/add/ HTTP/1.1" 200 11866 Internal Server Error: /admin/socialaccount/socialapp/add/ Traceback (most recent call last): File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\backends\utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\backends\sqlite3\base.py", line 423, in execute return Database.Cursor.execute(self, query, params) sqlite3.OperationalError: no such table: socialaccount_socialapp_sites The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\core\handlers\exception.py", line 47, in inner response = get_response(request) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\contrib\admin\options.py", line 616, in wrapper return self.admin_site.admin_view(view)(*args, **kwargs) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\utils\decorators.py", line 130, in _wrapped_view response = view_func(request, *args, **kwargs) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\views\decorators\cache.py", line 44, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\contrib\admin\sites.py", line 232, in inner return view(request, *args, **kwargs) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\contrib\admin\options.py", line 1655, in add_view return self.changeform_view(request, None, form_url, extra_context) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\utils\decorators.py", line 43, in _wrapper return bound_method(*args, **kwargs) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\utils\decorators.py", line 130, in _wrapped_view response = view_func(request, *args, **kwargs) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\contrib\admin\options.py", line 1538, in changeform_view return self._changeform_view(request, object_id, form_url, extra_context) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\contrib\admin\options.py", line 1585, in _changeform_view self.save_related(request, form, formsets, not add) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\contrib\admin\options.py", line 1123, in save_related form.save_m2m() File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\forms\models.py", line 451, in _save_m2m f.save_form_data(self.instance, cleaned_data[f.name]) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\models\fields\related.py", line 1668, in save_form_data getattr(instance, self.attname).set(data) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\models\fields\related_descriptors.py", line 1000, in set old_ids = set(self.using(db).values_list(self.target_field.target_field.attname, flat=True)) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\models\query.py", line 280, in __iter__ self._fetch_all() File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\models\query.py", line 1324, in _fetch_all self._result_cache = list(self._iterable_class(self)) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\models\query.py", line 171, in __iter__ for row in compiler.results_iter(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size): File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\models\sql\compiler.py", line 1124, in results_iter results = self.execute_sql(MULTI, chunked_fetch=chunked_fetch, chunk_size=chunk_size) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\models\sql\compiler.py", line 1169, in execute_sql cursor.execute(sql, params) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\backends\utils.py", line 98, in execute return super().execute(sql, params) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\backends\utils.py", line 66, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\backends\utils.py", line 75, in _execute_with_wrappers return executor(sql, params, many, context) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\backends\utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\backends\utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "C:\github-project1\djangoweb1\venv\lib\site-packages\django\db\backends\sqlite3\base.py", line 423, in execute return Database.Cursor.execute(self, query, params) django.db.utils.OperationalError: no such table: socialaccount_socialapp_sites
목록보기
sungyong 2 years, 7 months ago
답변이 늦었습니다.
중간에 어떤 시점에서 꼬이기 시작했는지 알수가 없지만, db.sqlite3를 지우고 처음부터 하시면 잘 될 것 같습니다.
Updated: March 30, 2022, 10:44 p.m.
Leave a Comment: