Closed NeonDaniel closed 1 year ago
With the changes here, I am seeing the below error while a client constantly reloads (deployed to the Kubernetes test
namespace at klat.2021.us)
2023-10-19 01:01:08.261 - server_err - chat_server.app:log_requests:85 - INFO - rid=SF1IL4 start request path=/users_api/
2023-10-19 01:01:08.264 - server_err - chat_server.server_utils.auth:get_current_user_data:202 - INFO - Fetched user data: {'_id': 'c13085e241bc428fbb65', 'first_name': 'Klat', 'last_name': 'Guest', 'nickname': 'guest_cc6cbf46', 'password': '128d8b31a612b208f94547fae220cbde828e0006be59975cc5b786f3bcca0b1640776cfed380103f1ebd516e9de31f21c0012fb6e7c06cf6f1faf3c7ad0e32c8', 'date_created': 1697677267, 'is_tmp': True}
2023-10-19 01:01:08.267 - server_err - utils.database_utils.mongodb_connector:exec_raw_query:95 - ERROR - Query failed: {'document': 'users', 'command': 'update', 'data': ({'_id': 'c13085e241bc428fbb65'}, {'$set': {'preferences': {'tts': {}, 'chat_language_mapping': {}}}}), 'filters': None}
2023-10-19 01:01:08.268 - server_err - chat_server.server_utils.auth:get_current_user_data:222 - ERROR - Problem resolving current user: 'Collection' object is not callable. If you meant to call the 'update' method on a 'Collection' object it is failing because no such method exists.
setting tmp user credentials
Traceback (most recent call last):
File "/app/chat_server/server_utils/auth.py", line 203, in get_current_user_data
user["preferences"] = DbUtils.get_user_preferences(
File "/app/chat_server/server_utils/db_utils.py", line 547, in get_user_preferences
cls.db_controller.exec_query(
File "/app/chat_server/utils/database_utils/db_controller.py", line 89, in exec_query
return self.connector.exec_raw_query(query=query, *args, **kwargs)
File "/app/chat_server/utils/database_utils/mongodb_connector.py", line 96, in exec_raw_query
raise e
File "/app/chat_server/utils/database_utils/mongodb_connector.py", line 93, in exec_raw_query
query_output = db_command(*query.get("data"), *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/pymongo/collection.py", line 3509, in __call__
raise TypeError(
TypeError: 'Collection' object is not callable. If you meant to call the 'update' method on a 'Collection' object it is failing because no such method exists.
2023-10-19 01:01:08.269 - server_err - chat_server.server_utils.auth:get_current_user_data:225 - DEBUG - Creating temp user
2023-10-19 01:01:08.272 - server_err - chat_server.server_utils.auth:create_unauthorized_user:152 - DEBUG - Created new user with name guest_73165de3
2023-10-19 01:01:08.273 - server_err - chat_server.server_utils.auth:get_current_user_data:227 - DEBUG - Resolved user: UserData(user={'first_name': 'Klat', 'last_name': 'Guest', 'nickname': 'guest_73165de3', '_id': 'fea461c0723942eebb26', 'password': 'e62505b4bb4369f2eb3ef6c3b5fe3e2bab63e6ddd542acbf09360a32587302147cce8d21a46357451e3a631890bb4739a3cb95351f4e23e67dfa46178862a275', 'date_created': 1697677268, 'is_tmp': True}, session='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJmZWE0NjFjMDcyMzk0MmVlYmIyNiIsImNyZWF0aW9uX3RpbWUiOjE2OTc2NzcyNjgsImxhc3RfcmVmcmVzaF90aW1lIjoxNjk3Njc3MjY4fQ.42fPBfMk_oii4KNntIdaIxEU8ivsIwfHTlKAeFuVw2c')
2023-10-19 01:01:08.274 - server_err - chat_server.app:log_requests:92 - INFO - rid=SF1IL4 completed_in=12.12ms status_code=200
2023-10-19 01:01:08.264 - server_err - chat_server.server_utils.auth:get_current_user_data:202 - INFO - Fetched user data: {'_id': 'c13085e241bc428fbb65', 'first_name': 'Klat', 'last_name': 'Guest', 'nickname': 'guest_cc6cbf46', 'password': '128d8b31a612b208f94547fae220cbde828e0006be59975cc5b786f3bcca0b1640776cfed380103f1ebd516e9de31f21c0012fb6e7c06cf6f1faf3c7ad0e32c8', 'date_created': 1697677267, 'is_tmp': True}
I fixed it in my admin PR #72
Description
Update containers to fully support ovos-config Updates configuration handling to fall back to ovos-config when json configuration is not available Includes minor bugfix around CORS envvar handling
Issues
Other Notes