2/6/26Less than 1 minute
- interview41
- MySQL25
- java11
- python11
- ECS10
- Linux10
- nowcoder9
- git6
- go6
- spring6
- Computer Base6
- llm5
- wsl5
- vlm4
- postgresql4
- Intro4
- 源码分析4
- computer tower4
- Logging Framework3
- c3
- Environment setup3
- redis2
- 架构2
- docker2
- c++2
- milvus2
- wechat2
- CLion2
- MySQL查询深入优化2
- architect1
- Tools1
- icon1
- markdown1
- docker compose1
- Nginx1
- k8s1
- ssh1
- springboot1
- Design Patterns1
- Term1
- windows1
- chocolatey1
- Blog1
- vue1
- trouble shooting1
2/6/26Less than 1 minute
2/6/26Less than 1 minute
2/6/26Less than 1 minute
微积分
2/6/26Less than 1 minute
线性代数
2/6/26Less than 1 minute
统计学
2/6/26Less than 1 minute
背景
在 Linux 上运行 celery,执行 celery -A _celery worker -l INFO 的时候报错
/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/celery/platforms.py:829: SecurityWarning: You're running the worker with superuser privileges: this is
absolutely not recommended!
Please specify a different user using the --uid option.
User information: uid=0 euid=0 gid=0 egid=0
warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
-------------- celery@DESKTOP-I2O884V v5.4.0 (opalescent)
--- ***** -----
-- ******* ---- Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.34 2024-07-18 10:32:43
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: spiders:0x7f0aa7fda520
- ** ---------- .> transport: redis://localhost:6379/0
- ** ---------- .> results: redis://
- *** --- * --- .> concurrency: 16 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[tasks]
. _celery.tasks.add
. _celery.tasks.multiplication
. _celery.tasks.xsum
[2024-07-18 10:32:43,612: CRITICAL/MainProcess] Unrecoverable error: ModuleNotFoundError("No module named '_ctypes'")
Traceback (most recent call last):
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/celery/worker/worker.py", line 202, in start
self.blueprint.start(self)
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/celery/bootsteps.py", line 365, in start
return self.obj.start()
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/celery/concurrency/base.py", line 130, in start
self.on_start()
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/celery/concurrency/prefork.py", line 109, in on_start
P = self._pool = Pool(processes=self.limit,
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/celery/concurrency/asynpool.py", line 464, in __init__
super().__init__(processes, *args, **kwargs)
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/billiard/pool.py", line 1045, in __init__
self._create_worker_process(i)
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/celery/concurrency/asynpool.py", line 482, in _create_worker_process
return super()._create_worker_process(i)
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/billiard/pool.py", line 1141, in _create_worker_process
on_ready_counter = self._ctx.Value('i')
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/billiard/context.py", line 177, in Value
from .sharedctypes import Value
File "/root/.pyenv/versions/3.8.0/envs/python-3.8.0/lib/python3.8/site-packages/billiard/sharedctypes.py", line 10, in <module>
import ctypes
File "/root/.pyenv/versions/3.8.0/lib/python3.8/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
7/19/24About 1 min
背景
在 Windows 上运行 celery,执行 res.get(timeout=10) 的时候报错
res.get(timeout=10)
Traceback (most recent call last):
File "C:\Apps\JetBrains\PyCharm 2023.3.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Tools\miniconda3\envs\python3.8\lib\site-packages\celery\result.py", line 251, in get
return self.backend.wait_for_pending(
File "C:\Tools\miniconda3\envs\python3.8\lib\site-packages\celery\backends\asynchronous.py", line 223, in wait_for_pending
return result.maybe_throw(callback=callback, propagate=propagate)
File "C:\Tools\miniconda3\envs\python3.8\lib\site-packages\celery\result.py", line 365, in maybe_throw
self.throw(value, self._to_remote_traceback(tb))
File "C:\Tools\miniconda3\envs\python3.8\lib\site-packages\celery\result.py", line 358, in throw
self.on_ready.throw(*args, **kwargs)
File "C:\Tools\miniconda3\envs\python3.8\lib\site-packages\vine\promises.py", line 235, in throw
reraise(type(exc), exc, tb)
File "C:\Tools\miniconda3\envs\python3.8\lib\site-packages\vine\utils.py", line 27, in reraise
raise value
ValueError: not enough values to unpack (expected 3, got 0)
7/19/24Less than 1 minute
背景:想要使用命令行执行 python 脚本,但是得到了 ModuleNotFoundError: No module named 'xxx'
项目结构
py-spider
└── util
├── request.py
├── mysql_pool.py
├── logger.py
└── __init__.py
└── spider
├── spider_demo.py
└── __init__.py
└── main.py
7/11/24About 4 min
