INFO:     Started server process [80993]
INFO:     Waiting for application startup.
2026-01-12 00:00:17,179 - passlib.handlers.bcrypt - WARNING - (trapped) error reading bcrypt version
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/passlib/handlers/bcrypt.py", line 620, in _load_backend_mixin
    version = _bcrypt.__about__.__version__
              ^^^^^^^^^^^^^^^^^
AttributeError: module 'bcrypt' has no attribute '__about__'
2026-01-12 00:00:17,431 - root - INFO - Demo user created on startup
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)
Using mongomock fallback!
INFO:     127.0.0.1:37180 - "OPTIONS /api/auth/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:37182 - "POST /api/auth/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:37182 - "OPTIONS /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:37182 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:44818 - "POST /api/auth/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:44818 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:40458 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:40458 - "OPTIONS /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:42732 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:42744 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:59300 - "OPTIONS /api/courses/foundation-cybersecurity/enroll HTTP/1.1" 200 OK
INFO:     127.0.0.1:59314 - "POST /api/courses/foundation-cybersecurity/enroll HTTP/1.1" 200 OK
INFO:     127.0.0.1:59314 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:41416 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:41428 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:41440 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:52004 - "GET /api/leaderboard?limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:36662 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:36662 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:58120 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:58120 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:51412 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:50278 - "OPTIONS /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:50284 - "GET /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:50284 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:50278 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:56206 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:56206 - "GET /api/leaderboard?limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:43554 - "OPTIONS /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:43562 - "GET /api/auth/me HTTP/1.1" 401 Unauthorized
INFO:     127.0.0.1:55066 - "OPTIONS /api/auth/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:55080 - "POST /api/auth/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:55080 - "OPTIONS /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:55066 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:48364 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:48374 - "OPTIONS /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:48378 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:43160 - "OPTIONS /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:43166 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:43166 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:43160 - "OPTIONS /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:35168 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:45790 - "GET /api/leaderboard?limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:56878 - "GET /api/leaderboard?limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:56878 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:40206 - "GET /api/leaderboard?limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:38396 - "GET /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:38396 - "GET /api/leaderboard?limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:45678 - "GET /api/leaderboard?limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:45678 - "GET /api/leaderboard?limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:45678 - "OPTIONS /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:45694 - "GET /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:45694 - "GET /api/leaderboard?limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:45694 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:45678 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:53968 - "OPTIONS /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:53972 - "GET /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:53972 - "OPTIONS /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:53968 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:55608 - "GET /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:55608 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:55616 - "OPTIONS /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:55608 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:55618 - "OPTIONS /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:55622 - "GET /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:55622 - "OPTIONS /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:55618 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:34192 - "OPTIONS /api/courses/warrior-cybersecurity/enroll HTTP/1.1" 200 OK
INFO:     127.0.0.1:34196 - "POST /api/courses/warrior-cybersecurity/enroll HTTP/1.1" 200 OK
INFO:     127.0.0.1:34196 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:60276 - "OPTIONS /api/auth/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:60280 - "POST /api/auth/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:60280 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:43970 - "GET /api/leaderboard?limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:38748 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:38760 - "OPTIONS /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:38748 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:60480 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:52170 - "OPTIONS /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:52182 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:52182 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:52170 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:57870 - "OPTIONS /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:57880 - "OPTIONS /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:57890 - "GET /api/auth/me HTTP/1.1" 401 Unauthorized
INFO:     127.0.0.1:57880 - "GET /api/auth/me HTTP/1.1" 401 Unauthorized
INFO:     127.0.0.1:54354 - "OPTIONS /api/auth/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:54358 - "POST /api/auth/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:54358 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:54358 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:58076 - "OPTIONS /api/community/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:58092 - "OPTIONS /api/community/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:58092 - "GET /api/leaderboard?timeframe=all-time&category=overall&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:58076 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:58092 - "GET /api/leaderboard?timeframe=all-time&category=overall&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:58096 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:58092 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:58112 - "OPTIONS /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:58122 - "OPTIONS /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:58092 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:58122 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:58092 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:58092 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:58122 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:56628 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:56628 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:56628 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:56634 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:56634 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:56628 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:56628 - "GET /api/leaderboard?timeframe=all-time&category=overall&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:56634 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:56628 - "GET /api/leaderboard?timeframe=all-time&category=overall&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:56648 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:56076 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:56088 - "GET /api/leaderboard?timeframe=all-time&category=games&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:56088 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:56088 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:40270 - "GET /api/leaderboard?timeframe=all-time&category=overall&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:40282 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:40270 - "GET /api/leaderboard?timeframe=all-time&category=overall&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:40284 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:40288 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:40288 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:58562 - "POST /api/auth/login HTTP/1.1" 200 OK
INFO:     127.0.0.1:58562 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:58562 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:49054 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:49058 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:49054 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:49058 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:39484 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:39484 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:58346 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:58362 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:58378 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:58362 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:58362 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:58362 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:37248 - "OPTIONS /api/courses/warrior-cybersecurity/certificate HTTP/1.1" 200 OK
INFO:     127.0.0.1:37260 - "OPTIONS /api/courses/warrior-cybersecurity/certificate HTTP/1.1" 200 OK
INFO:     127.0.0.1:37262 - "GET /api/courses/warrior-cybersecurity/certificate HTTP/1.1" 200 OK
INFO:     127.0.0.1:37262 - "GET /api/courses/warrior-cybersecurity/certificate HTTP/1.1" 200 OK
INFO:     127.0.0.1:60188 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:60188 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:60188 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:60196 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:60188 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:60196 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:60196 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:60196 - "GET /api/games HTTP/1.1" 200 OK
INFO:     127.0.0.1:52874 - "OPTIONS /api/games/score HTTP/1.1" 200 OK
INFO:     127.0.0.1:52878 - "POST /api/games/score HTTP/1.1" 422 Unprocessable Entity
INFO:     127.0.0.1:52892 - "GET /api/leaderboard?timeframe=all-time&category=overall&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:52894 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:52892 - "GET /api/leaderboard?timeframe=all-time&category=overall&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:52902 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:38466 - "OPTIONS /api/tools/mobile-carrier HTTP/1.1" 200 OK
INFO:     127.0.0.1:38476 - "POST /api/tools/mobile-carrier HTTP/1.1" 200 OK
INFO:     127.0.0.1:36580 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:36592 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:36580 - "GET /api/courses HTTP/1.1" 200 OK
INFO:     127.0.0.1:36592 - "GET /api/courses/my-enrollments HTTP/1.1" 200 OK
INFO:     127.0.0.1:36592 - "GET /api/leaderboard?timeframe=all-time&category=overall&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:36580 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:36592 - "GET /api/leaderboard?timeframe=all-time&category=overall&limit=50 HTTP/1.1" 200 OK
INFO:     127.0.0.1:36594 - "GET /api/community/stats HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/venv/lib/python3.12/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lcs/Documents/dev/EduA03-main/backend/server.py", line 664, in get_community_stats
    total_players = await db.users.count_documents({})
                          ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MockAsyncIOMotorCollection' object has no attribute 'count_documents'
INFO:     127.0.0.1:36592 - "OPTIONS /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:36596 - "OPTIONS /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:36598 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:36598 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:36630 - "OPTIONS /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:36638 - "OPTIONS /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:36646 - "GET /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:36646 - "GET /api/auth/me HTTP/1.1" 200 OK
INFO:     127.0.0.1:36646 - "OPTIONS /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:36638 - "OPTIONS /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:36630 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
INFO:     127.0.0.1:36630 - "GET /api/dashboard/stats HTTP/1.1" 200 OK
