2026-04-28 08:23:33,154 - main - INFO - === Logging system initialized ===
2026-04-28 08:23:33,154 - main - INFO - Log file: logs/app_20260428_082333.log
2026-04-28 08:23:33,154 - main - INFO - Log level: INFO
2026-04-28 08:23:33,155 - main - INFO - Timestamp: 20260428_082333
2026-04-28 08:23:33,843 - main - INFO - Included router: routers.aihub.router
2026-04-28 08:23:33,858 - main - INFO - Included router: routers.auth.router
2026-04-28 08:23:33,860 - main - INFO - Included router: routers.health.router
2026-04-28 08:23:33,878 - main - INFO - Included router: routers.settings.router
2026-04-28 08:23:33,911 - main - INFO - Included router: routers.storage.router
2026-04-28 08:23:33,917 - main - INFO - Included router: routers.user.router
2026-04-28 08:23:33,956 - main - INFO - Included router: routers.user_profiles.router
2026-04-28 08:23:33,957 - main - INFO - === Application startup initiated ===
2026-04-28 08:23:33,957 - services.database - INFO - Ignore creating tables
2026-04-28 08:23:33,958 - services.mock_data - INFO - Ignore initialize data
2026-04-28 08:23:33,958 - services.auth - INFO - Ignore initialize admin
2026-04-28 08:23:33,958 - main - INFO - === Application startup completed successfully ===
2026-04-28 08:23:37,929 - core.config - DEBUG - Read dynamic attribute jwt_secret_key from environment variable JWT_SECRET_KEY
2026-04-28 08:23:37,930 - core.config - DEBUG - Read dynamic attribute jwt_algorithm from environment variable JWT_ALGORITHM
2026-04-28 08:23:37,939 - core.auth - DEBUG - Authentication token validated for user hash: 4f820a44
2026-04-28 08:23:38,264 - core.auth - DEBUG - Authentication token validated for user hash: 4f820a44
2026-04-28 08:23:38,264 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-28 08:23:38,264 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-04-28 08:23:38,264 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-04-28 08:23:38,264 - core.database - INFO - Starting database initialization...
2026-04-28 08:23:38,265 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-04-28 08:23:38,265 - core.database - INFO - Normalizing database URL for async compatibility...
2026-04-28 08:23:38,266 - core.database - INFO - Creating async database engine...
2026-04-28 08:23:38,266 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-04-28 08:23:38,312 - core.database - INFO - Database engine created successfully
2026-04-28 08:23:38,312 - core.database - INFO - Creating async session maker...
2026-04-28 08:23:38,312 - core.database - INFO - Async session maker created successfully
2026-04-28 08:23:38,312 - core.database - INFO - Database connection initialized successfully
2026-04-28 08:23:38,312 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-04-28 08:23:38,312 - core.database - INFO - 🔧 Starting table creation...
2026-04-28 08:23:39,707 - core.database - INFO - Tables initialized successfully
2026-04-28 08:23:39,707 - core.database - DEBUG - [DB_OP] Create tables completed in 1.3954s
2026-04-28 08:23:39,771 - core.database - INFO - Lazy database initialization completed successfully
2026-04-28 08:23:39,771 - core.database - DEBUG - [DB_OP] Database session created successfully in 1.5069s
2026-04-28 08:23:39,772 - routers.user_profiles - DEBUG - Querying user_profiless: query={}, sort=None, skip=0, limit=1, fields=None
2026-04-28 08:23:39,772 - services.user_profiles - ERROR - Error fetching user_profiles list: type object 'User_profiles' has no attribute 'user_id'
2026-04-28 08:23:39,772 - 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:39,774 - 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:39,777 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.5133s
2026-04-28 08:23:39,778 - 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:24:51,108 - services.database - DEBUG - [DB_OP] Starting database close
2026-04-28 08:24:51,176 - core.database - INFO - Database connection closed and engine disposed
2026-04-28 08:24:51,176 - services.database - INFO - Database connections closed
2026-04-28 08:24:51,176 - services.database - DEBUG - [DB_OP] Database close completed in 0.0679s
