2016-12-16 4 views
8

मैं अजवाइन के साथ नया हूँ और मैं ट्यूटोरियल अपनी साइट पर दिए गए अनुसरण कर रही हूं मैं इस त्रुटिअजवाइन WindowsError: [त्रुटि 6] हैंडल अमान्य है

from celery import Celery 
app = Celery('tasks', broker='pyamqp://[email protected]//') 

@app.task 
def add(x, y): 
    return x + y 

हो गया और cmd इस

-------------- [email protected] v4.0.2 (latentcall) 
---- **** ----- 
--- * *** * -- Windows-10-10.0.14393 2016-12-16 20:05:48 
-- * - **** --- 
- ** ---------- [config] 
- ** ---------- .> app:   tasks:0x4591950 
- ** ---------- .> transport: amqp://guest:**@localhost:5672// 
- ** ---------- .> results:  disabled:// 
- *** --- * --- .> concurrency: 4 (prefork) 
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) 
--- ***** ----- -------------- [queues] 
       .> celery   exchange=celery(direct) key=celery 


[tasks] . tasks.add 

[2016-12-16 20:05:49,029: CRITICAL/MainProcess] Unrecoverable error: 
TypeError('argument 1 must be an integer, not _subprocess_handle',) 
Traceback (most recent call last): File 
"c:\python27\lib\site-packages\celery\worker\worker.py", line 203, in 
start 
    self.blueprint.start(self) File "c:\python27\lib\site-packages\celery\bootsteps.py", line 119, in 
start 
    step.start(parent) File "c:\python27\lib\site-packages\celery\bootsteps.py", line 370, in 
start 
    return self.obj.start() File "c:\python27\lib\site-packages\celery\concurrency\base.py", line 131, 
in start 
    self.on_start() File "c:\python27\lib\site-packages\celery\concurrency\prefork.py", line 
112, in on_start 
    **self.options) File "c:\python27\lib\site-packages\billiard\pool.py", line 1008, in 
__init__ 
    self._create_worker_process(i) File "c:\python27\lib\site-packages\billiard\pool.py", line 1117, in 
_create_worker_process 
    w.start() File "c:\python27\lib\site-packages\billiard\process.py", line 122, in 
start 
    self._popen = self._Popen(self) File "c:\python27\lib\site-packages\billiard\context.py", line 383, in 
_Popen 
    return Popen(process_obj) File "c:\python27\lib\site-packages\billiard\popen_spawn_win32.py", line 
64, in __init__ 
    _winapi.CloseHandle(ht) TypeError: argument 1 must be an integer, not _subprocess_handle Traceback (most recent call last): File 
"<string>", line 1, in <module> File 
"c:\python27\lib\site-packages\billiard\spawn.py", line 159, in 
spawn_main 
    new_handle = steal_handle(parent_pid, pipe_handle) File "c:\python27\lib\site-packages\billiard\reduction.py", line 126, in 
steal_handle 
    _winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE) >WindowsError: [Error 6] The handle is invalid 
तरह त्रुटि दिखाता है

उत्तर

0

ऐसा लगता है कि आपका rabbitmq सर्वर नहीं चल रहा है। क्या आपने इंस्टॉल किया और rabbimq सर्वर शुरू किया?

आप rabbitmq docs and install it चेकआउट कर सकते हैं। RabbitMQ सर्वर प्रारंभ करें और उसके बाद 4.0 से

celery worker -l info -A tasks 
+0

धन्यवाद !, लेकिन अजवाइन आदेश वही त्रुटि des फेंकता सवाल में cribed। –

1

अजवाइन Windows में अब समर्थित नहीं है अपने एप्लिकेशन के साथ अपने अजवाइन कार्यकर्ता शुरू करते हैं, यह देखें: http://docs.celeryproject.org/en/latest/whatsnew-4.0.html#removed-features

दुर्भाग्य से, इस बग दुष्प्रभाव में से एक हो रहा है (प्रक्रिया के लिए समर्थन निकाल हैंडल)

आपका सबसे अच्छा शर्त अजवाइन डाउनग्रेड करने के लिए, पहले तो इसे हटाने है: pip install celery==3.1.18

+0

सेलेरी 3.1.18 तक डाउनग्रेड किया गया और पीआईपी ने निम्नलिखित पुस्तकालयों को डाउनग्रेड किया: एमक्यूपी 2.1.3 -> 1.4.9, बिलियर्ड 3.5.0.2 -> 3.3.0.23, कोम्बू 4.0.1 -> 3.0.37 भी। अब django_celery_results शिकायत कर रहा है: 'फ़ाइल" ई: \ virtualenvs \ डैशबोर्ड्स \ lib \ साइट-संकुल \ django_celery_results \ models.py ", लाइन 8, celery.five आयात python_2_unicode_compatible ImportError से में: नाम python_2_unicode_compatible' –

+0

आयात नहीं कर सकते django-अजवाइन-परिणाम केवल अजवाइन 4+ से शुरू संगत है। डीजेसेलरी को इसके बजाय काम करना चाहिए। –

संबंधित मुद्दे