Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post_reply(config.bot_url(), "发生了未知错误Orz", user_id) #18

Open
bgsnwhh opened this issue Aug 5, 2023 · 1 comment
Open

Comments

@bgsnwhh
Copy link

bgsnwhh commented Aug 5, 2023

023/08/05 14:47:33 stderr UnboundLocalError: local variable 'config' referenced before assignment
2023/08/05 14:47:33 stderr post_reply(config.bot_url(), "发生了未知错误Orz", user_id)
2023/08/05 14:47:33 stderr File "/app/chat/views.py", line 117, in chatgpt_reply
2023/08/05 14:47:33 stderr self._target(*self._args, **self._kwargs)
2023/08/05 14:47:33 stderr File "/usr/local/lib/python3.8/threading.py", line 870, in run
2023/08/05 14:47:33 stderr self.run()
2023/08/05 14:47:33 stderr File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
2023/08/05 14:47:33 stderr Traceback (most recent call last):
2023/08/05 14:47:33 stderr  
2023/08/05 14:47:33 stderr During handling of the above exception, another exception occurred:
2023/08/05 14:47:33 stderr  
2023/08/05 14:47:33 stderr chat.models.DoesNotExist: ChatGPTConfiguration matching query does not exist.
2023/08/05 14:47:33 stderr raise self.model.DoesNotExist(
2023/08/05 14:47:33 stderr File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 637, in get
2023/08/05 14:47:33 stderr return getattr(self.get_queryset(), name)(*args, **kwargs)
2023/08/05 14:47:33 stderr File "/usr/local/lib/python3.8/site-packages/django/db/models/manager.py", line 87, in manager_method
2023/08/05 14:47:33 stderr config = ChatGPTConfiguration.objects.get(user_id=user_id)
2023/08/05 14:47:33 stderr File "/app/chat/views.py", line 72, in chatgpt_reply
2023/08/05 14:47:33 stderr Traceback (most recent call last):
2023/08/05 14:47:33 stderr Exception in thread Thread-1:
2023/08/05 14:47:33 stderr chat.models.ChatGPTConfiguration.DoesNotExist: ChatGPTConfiguration matching query does not exist.
2023/08/05 14:47:33 stderr raise self.model.DoesNotExist(
2023/08/05 14:47:33 stderr File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 637, in get
2023/08/05 14:47:33 stderr return getattr(self.get_queryset(), name)(*args, **kwargs)
2023/08/05 14:47:33 stderr File "/usr/local/lib/python3.8/site-packages/django/db/models/manager.py", line 87, in manager_method
2023/08/05 14:47:33 stderr config = ChatGPTConfiguration.objects.get(user_id=user_id)
2023/08/05 14:47:33 stderr File "/app/chat/views.py", line 72, in chatgpt_reply
2023/08/05 14:47:33 stderr Traceback (most recent call last):
2023/08/05 14:47:09 stderr [2023-08-05 06:47:09 +0000] [13] [INFO] Booting worker with pid: 13
2023/08/05 14:47:09 stderr [2023-08-05 06:47:09 +0000] [11] [INFO] Using worker: sync
2023/08/05 14:47:09 stderr [2023-08-05 06:47:09 +0000] [11] [INFO] Listening at: http://0.0.0.0:8000 (11)
2023/08/05 14:47:09 stderr [2023-08-05 06:47:09 +0000] [11] [INFO] Starting gunicorn 21.2.0
2023/08/05 14:47:09 stdout Applying sessions.0001_initial... OK
2023/08/05 14:47:04 stdout Applying chat.0002_chatgptconfiguration_base_url_and_more... OK
2023/08/05 14:47:03 stdout Applying chat.0001_initial... OK
2023/08/05 14:47:03 stdout Applying auth.0012_alter_user_first_name_max_length... OK
2023/08/05 14:47:02 stdout Applying auth.0011_update_proxy_permissions... OK
2023/08/05 14:47:02 stdout Applying auth.0010_alter_group_name_max_length... OK
2023/08/05 14:47:01 stdout Applying auth.0009_alter_user_last_name_max_length... OK
2023/08/05 14:47:01 stdout Applying auth.0008_alter_user_username_max_length... OK
2023/08/05 14:47:00 stdout Applying auth.0007_alter_validators_add_error_messages... OK
2023/08/05 14:47:00 stdout Applying auth.0006_require_contenttypes_0002... OK
2023/08/05 14:46:59 stdout Applying auth.0005_alter_user_last_login_null... OK
2023/08/05 14:46:59 stdout Applying auth.0004_alter_user_username_opts... OK
2023/08/05 14:46:58 stdout Applying auth.0003_alter_user_email_max_length... OK
2023/08/05 14:46:58 stdout Applying auth.0002_alter_permission_name_max_length... OK
2023/08/05 14:46:57 stdout Applying contenttypes.0002_remove_content_type_name... OK
2023/08/05 14:46:57 stdout Applying admin.0003_logentry_add_action_flag_choices... OK
2023/08/05 14:46:56 stdout Applying admin.0002_logentry_remove_auto_add... OK
2023/08/05 14:46:56 stdout Applying admin.0001_initial... OK
2023/08/05 14:46:55 stdout Applying auth.0001_initial... OK
2023/08/05 14:46:54 stdout Applying contenttypes.0001_initial... OK
@mujiannan
Copy link

你启动后直接对话了?需要先调用斜杠命令添加用户才行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants