2026-04-28 08:22:53,469 - main - INFO - === Logging system initialized ===
2026-04-28 08:22:53,469 - main - INFO - Log file: logs/app_20260428_082253.log
2026-04-28 08:22:53,469 - main - INFO - Log level: INFO
2026-04-28 08:22:53,470 - main - INFO - Timestamp: 20260428_082253
2026-04-28 08:22:54,423 - main - INFO - Included router: routers.aihub.router
2026-04-28 08:22:54,444 - main - INFO - Included router: routers.auth.router
2026-04-28 08:22:54,447 - main - INFO - Included router: routers.health.router
2026-04-28 08:22:54,469 - main - INFO - Included router: routers.settings.router
2026-04-28 08:22:54,505 - main - INFO - Included router: routers.storage.router
2026-04-28 08:22:54,514 - main - INFO - Included router: routers.user.router
2026-04-28 08:22:54,625 - main - INFO - Included router: routers.user_profiles.router
2026-04-28 08:22:54,626 - main - INFO - === Application startup initiated ===
2026-04-28 08:22:54,626 - services.database - INFO - Ignore creating tables
2026-04-28 08:22:54,626 - services.mock_data - INFO - Ignore initialize data
2026-04-28 08:22:54,626 - services.auth - INFO - Ignore initialize admin
2026-04-28 08:22:54,626 - main - INFO - === Application startup completed successfully ===
2026-04-28 08:22:59,700 - core.config - DEBUG - Read dynamic attribute jwt_secret_key from environment variable JWT_SECRET_KEY
2026-04-28 08:22:59,700 - core.config - DEBUG - Read dynamic attribute jwt_algorithm from environment variable JWT_ALGORITHM
2026-04-28 08:22:59,709 - core.auth - DEBUG - Authentication token validated for user hash: 4f820a44
2026-04-28 08:23:00,055 - core.auth - DEBUG - Authentication token validated for user hash: 4f820a44
2026-04-28 08:23:00,056 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-28 08:23:00,056 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-04-28 08:23:00,056 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-04-28 08:23:00,056 - core.database - INFO - Starting database initialization...
2026-04-28 08:23:00,056 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-04-28 08:23:00,056 - core.database - INFO - Normalizing database URL for async compatibility...
2026-04-28 08:23:00,057 - core.database - INFO - Creating async database engine...
2026-04-28 08:23:00,057 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-04-28 08:23:00,103 - core.database - INFO - Database engine created successfully
2026-04-28 08:23:00,103 - core.database - INFO - Creating async session maker...
2026-04-28 08:23:00,104 - core.database - INFO - Async session maker created successfully
2026-04-28 08:23:00,104 - core.database - INFO - Database connection initialized successfully
2026-04-28 08:23:00,104 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-04-28 08:23:00,104 - core.database - INFO - 🔧 Starting table creation...
2026-04-28 08:23:01,511 - core.database - INFO - Tables initialized successfully
2026-04-28 08:23:01,531 - core.database - DEBUG - [DB_OP] Create tables completed in 1.4276s
2026-04-28 08:23:01,595 - core.database - INFO - Lazy database initialization completed successfully
2026-04-28 08:23:01,596 - core.database - DEBUG - [DB_OP] Database session created successfully in 1.5401s
2026-04-28 08:23:01,597 - routers.user_profiles - DEBUG - Querying user_profiless: query={}, sort=None, skip=0, limit=1, fields=None
2026-04-28 08:23:01,597 - services.user_profiles - ERROR - Error fetching user_profiles list: type object 'User_profiles' has no attribute 'user_id'
2026-04-28 08:23:01,598 - routers.user_profiles - ERROR - Error querying user_profiless: type object 'User_profiles' has no attribute 'user_id'
Traceback (most recent call last):
  File "/workspace/app/backend/routers/user_profiles.py", line 97, in query_user_profiless
    result = await service.get_list(
  File "/workspace/app/backend/services/user_profiles.py", line 70, in get_list
    query = query.where(User_profiles.user_id == user_id)
AttributeError: type object 'User_profiles' has no attribute 'user_id'
2026-04-28 08:23:01,600 - core.database - ERROR - Database session error: 500: Internal server error: type object 'User_profiles' has no attribute 'user_id'
Traceback (most recent call last):
  File "/workspace/app/backend/routers/user_profiles.py", line 97, in query_user_profiless
    result = await service.get_list(
  File "/workspace/app/backend/services/user_profiles.py", line 70, in get_list
    query = query.where(User_profiles.user_id == user_id)
AttributeError: type object 'User_profiles' has no attribute 'user_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspace/app/backend/core/database.py", line 553, in get_db
    yield session
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 120, in app
    response = await f(request)
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 674, in app
    raw_response = await run_endpoint_function(
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 328, in run_endpoint_function
    return await dependant.call(**values)
  File "/workspace/app/backend/routers/user_profiles.py", line 110, in query_user_profiless
    raise HTTPException(status_code=500, detail=f"Internal server error: {str(e)}")
fastapi.exceptions.HTTPException: 500: Internal server error: type object 'User_profiles' has no attribute 'user_id'
2026-04-28 08:23:01,612 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.5569s
2026-04-28 08:23:01,613 - core.database - ERROR - Failed to create database session: 500: Internal server error: type object 'User_profiles' has no attribute 'user_id'
Traceback (most recent call last):
  File "/workspace/app/backend/routers/user_profiles.py", line 97, in query_user_profiless
    result = await service.get_list(
  File "/workspace/app/backend/services/user_profiles.py", line 70, in get_list
    query = query.where(User_profiles.user_id == user_id)
AttributeError: type object 'User_profiles' has no attribute 'user_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspace/app/backend/core/database.py", line 553, in get_db
    yield session
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 120, in app
    response = await f(request)
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 674, in app
    raw_response = await run_endpoint_function(
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 328, in run_endpoint_function
    return await dependant.call(**values)
  File "/workspace/app/backend/routers/user_profiles.py", line 110, in query_user_profiless
    raise HTTPException(status_code=500, detail=f"Internal server error: {str(e)}")
fastapi.exceptions.HTTPException: 500: Internal server error: type object 'User_profiles' has no attribute 'user_id'
2026-04-28 08:23:23,778 - core.auth - DEBUG - Authentication token validated for user hash: 4f820a44
2026-04-28 08:23:24,063 - core.auth - DEBUG - Authentication token validated for user hash: 4f820a44
2026-04-28 08:23:24,063 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-28 08:23:24,063 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0002s
2026-04-28 08:23:24,064 - routers.user_profiles - DEBUG - Querying user_profiless: query={}, sort=None, skip=0, limit=1, fields=None
2026-04-28 08:23:24,064 - services.user_profiles - ERROR - Error fetching user_profiles list: type object 'User_profiles' has no attribute 'user_id'
2026-04-28 08:23:24,064 - routers.user_profiles - ERROR - Error querying user_profiless: type object 'User_profiles' has no attribute 'user_id'
Traceback (most recent call last):
  File "/workspace/app/backend/routers/user_profiles.py", line 97, in query_user_profiless
    result = await service.get_list(
  File "/workspace/app/backend/services/user_profiles.py", line 70, in get_list
    query = query.where(User_profiles.user_id == user_id)
AttributeError: type object 'User_profiles' has no attribute 'user_id'
2026-04-28 08:23:24,065 - core.database - ERROR - Database session error: 500: Internal server error: type object 'User_profiles' has no attribute 'user_id'
Traceback (most recent call last):
  File "/workspace/app/backend/routers/user_profiles.py", line 97, in query_user_profiless
    result = await service.get_list(
  File "/workspace/app/backend/services/user_profiles.py", line 70, in get_list
    query = query.where(User_profiles.user_id == user_id)
AttributeError: type object 'User_profiles' has no attribute 'user_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspace/app/backend/core/database.py", line 553, in get_db
    yield session
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 120, in app
    response = await f(request)
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 674, in app
    raw_response = await run_endpoint_function(
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 328, in run_endpoint_function
    return await dependant.call(**values)
  File "/workspace/app/backend/routers/user_profiles.py", line 110, in query_user_profiless
    raise HTTPException(status_code=500, detail=f"Internal server error: {str(e)}")
fastapi.exceptions.HTTPException: 500: Internal server error: type object 'User_profiles' has no attribute 'user_id'
2026-04-28 08:23:24,068 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.0046s
2026-04-28 08:23:24,068 - core.database - ERROR - Failed to create database session: 500: Internal server error: type object 'User_profiles' has no attribute 'user_id'
Traceback (most recent call last):
  File "/workspace/app/backend/routers/user_profiles.py", line 97, in query_user_profiless
    result = await service.get_list(
  File "/workspace/app/backend/services/user_profiles.py", line 70, in get_list
    query = query.where(User_profiles.user_id == user_id)
AttributeError: type object 'User_profiles' has no attribute 'user_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspace/app/backend/core/database.py", line 553, in get_db
    yield session
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 120, in app
    response = await f(request)
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 674, in app
    raw_response = await run_endpoint_function(
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 328, in run_endpoint_function
    return await dependant.call(**values)
  File "/workspace/app/backend/routers/user_profiles.py", line 110, in query_user_profiless
    raise HTTPException(status_code=500, detail=f"Internal server error: {str(e)}")
fastapi.exceptions.HTTPException: 500: Internal server error: type object 'User_profiles' has no attribute 'user_id'
2026-04-28 08:23:25,398 - services.database - DEBUG - [DB_OP] Starting database close
2026-04-28 08:23:25,466 - core.database - INFO - Database connection closed and engine disposed
2026-04-28 08:23:25,467 - services.database - INFO - Database connections closed
2026-04-28 08:23:25,467 - services.database - DEBUG - [DB_OP] Database close completed in 0.0683s
