게시글
질문&답변
2023.03.24
왜 list창으로 넘어가지 않나요?
그럼 강의했을 때 몽고db 버전을 올려주시면 설치해 보겠습니다
- 0
- 8
- 468
질문&답변
2023.03.23
왜 list창으로 넘어가지 않나요?
아래 3개 모두 count()를 count_documents() 로 변경했는데도 안됩니다. -Board.py tot_count = board.find(query).count_documents() -list.html% if datas.count_documents() > 0 %}-member.pycnt = members.count_documents({"email": email}) * Restarting with stat * Debugger is active! * Debugger PIN: 931-800-023127.0.0.1 - - [23/Mar/2023 18:52:27] "POST /member/join HTTP/1.1" 500 -Traceback (most recent call last): File "D:\PM_WebService\venv\Lib\site-packages\flask\app.py", line 2551, in call return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PM_WebService\venv\Lib\site-packages\flask\app.py", line 2531, in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PM_WebService\venv\Lib\site-packages\flask\app.py", line 2528, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PM_WebService\venv\Lib\site-packages\flask\app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PM_WebService\venv\Lib\site-packages\flask\app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PM_WebService\venv\Lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PM_WebService\main\member.py", line 24, in member_join cnt = members.count_documents({"email": email}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PM_WebService\venv\Lib\site-packages\pymongo\collection.py", line 1842, in count_documents return self._retryable_non_cursor_read(_cmd, session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PM_WebService\venv\Lib\site-packages\pymongo\collection.py", line 1847, in retryablenon_cursor_read with client._tmp_session(session) as s: File "C:\Program Files\Python311\Lib\contextlib.py", line 137, in enter return next(self.gen) ^^^^^^^^^^^^^^ File "D:\PM_WebService\venv\Lib\site-packages\pymongo\mongo_client.py", line 1757, in tmpsession s = self._ensure_session(session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PM_WebService\venv\Lib\site-packages\pymongo\mongo_client.py", line 1740, in ensuresession return self.__start_session(True, causal_consistency=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PM_WebService\venv\Lib\site-packages\pymongo\mongo_client.py", line 1685, in __start_session self._topology._check_implicit_session_support() File "D:\PM_WebService\venv\Lib\site-packages\pymongo\topology.py", line 538, in checkimplicit_session_support self._check_session_support() File "D:\PM_WebService\venv\Lib\site-packages\pymongo\topology.py", line 554, in checksession_support self._select_servers_loop( File "D:\PM_WebService\venv\Lib\site-packages\pymongo\topology.py", line 238, in selectservers_loop raise ServerSelectionTimeoutError(pymongo.errors.ServerSelectionTimeoutError: mongo:27017: [Errno 11001] getaddrinfo failed, Timeout: 30s, Topology Description: ]>127.0.0.1 - - [23/Mar/2023 18:52:28] "GET /member/join?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 304 -127.0.0.1 - - [23/Mar/2023 18:52:29] "GET /member/join?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 -127.0.0.1 - - [23/Mar/2023 18:52:29] "GET /member/join?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 304 -127.0.0.1 - - [23/Mar/2023 18:52:30] "GET /member/join?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 304 -
- 0
- 8
- 468
질문&답변
2023.03.23
왜 list창으로 넘어가지 않나요?
참고로 Mongodb 4.2.24 입니다 최근에 6.XXX 사용하다 강의 내용 보고 비슷한 버전으로 Down 했는데...
- 0
- 8
- 468
질문&답변
2023.03.23
왜 list창으로 넘어가지 않나요?
막연하게 어디 부분 이라고만 힌트를 주고 찾아보라고 하면 뭐하러 수강 한가요? 저처럼 초보자들은 접근도 못하겠네요
- 0
- 8
- 468
질문&답변
2023.03.23
왜 list창으로 넘어가지 않나요?
상위 버전에서 변경된 부분은 최근에 수강자들에게 공지를 해줘야 하는 것 아닌가요? 소스를 어디를 변경해야 한다던지 아니면 변경된 소스를 수정해서 업로드 하던지
- 0
- 8
- 468
질문&답변
2023.03.23
왜 list창으로 넘어가지 않나요?
하기처럼 수정한가요? run.py에서tot_count = board.count_documents()
- 0
- 8
- 468