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

ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403 #212

Open
luckyzsd1975 opened this issue Jan 24, 2025 · 7 comments

Comments

@luckyzsd1975
Copy link

ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403

执行python tasks.py时报错,应该如何解决呢?什么原因呢?信息谢谢

@bigbrother666sh
Copy link
Member

先去pb 文件夹执行下 ./pocketbase migrate

@sacwws
Copy link

sacwws commented Jan 25, 2025

没有找到pocketbase migrate啊

@bigbrother666sh
Copy link
Member

请拉取最近代码,然后在 wiseflow/pb 文件夹下执行 ./pocketbase migrate
如还有问题,请贴出详细的 log(console 的输出)

@luckyzsd1975
Copy link
Author

执行 ./pocketbase migrate后提示:No new migrations to apply.

并且在执行python tasks.py时报错信息如下,按下^C后抛出后面的异常:
2025-01-26 14:54:29.350 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.353 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.358 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.369 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.372 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.375 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.378 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.380 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.383 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.386 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.402 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
2025-01-26 14:54:29.404 | ERROR | utils.pb_api:read:41 - pocketbase get list failed: Response error. Status code:403
Traceback (most recent call last):
File "C:\website\wiseflow037\wiseflow\core\utils\pb_api.py", line 35, in read
res = self.client.collection(collection_name).get_list(i, 500,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\pocketbase\services\utils\crud_service.py", line 22, in get_list
return self._get_list(self.base_crud_path(), page, per_page, query_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\pocketbase\services\utils\base_crud_service.py", line 36, in _get_list
response_data = self.client.send(
^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\pocketbase\client.py", line 125, in send
raise ClientResponseError(
pocketbase.utils.ClientResponseError: Response error. Status code:403

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\website\wiseflow037\wiseflow\core\tasks.py", line 2, in
from general_process import main_process, pb, wiseflow_logger
File "C:\website\wiseflow037\wiseflow\core\general_process.py", line 23, in
existing_urls = {url['url'] for url in pb.read(collection_name='infos', fields=['url'], filter=f"created>='{one_month_ago}'")}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\website\wiseflow037\wiseflow\core\utils\pb_api.py", line 41, in read
self.logger.error(f"pocketbase get list failed: {e}")
File "C:\Python312\Lib\site-packages\loguru_logger.py", line 2056, in error
__self._log("ERROR", False, __self._options, __message, args, kwargs)
File "C:\Python312\Lib\site-packages\loguru_logger.py", line 2032, in _log
handler.emit(log_record, level_id, from_decorator, raw, colored_message)
File "C:\Python312\Lib\site-packages\loguru_handler.py", line 206, in emit
self._sink.write(str_record)
File "C:\Python312\Lib\site-packages\loguru_simple_sinks.py", line 16, in write
self._stream.write(message)
KeyboardInterrupt
^C

@bigbrother666sh
Copy link
Member

你更新代码了么?

git pull

@sacwws
Copy link

sacwws commented Jan 27, 2025

Image
是不是忘记放进去了?

@bigbrother666sh
Copy link
Member

你需要先下载 pocketbase 执行程序,看下 ReadMe 吧,提供了各个平台下的自动化安装脚本

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

3 participants