First time here? Check out the FAQ!

Eric Earnst's profile - activity

2020-12-14 17:20:16 -0500 received badge Famous Question (source)
2020-05-18 07:17:01 -0500 received badge Famous Question (source)
2019-03-16 20:50:11 -0500 received badge Notable Question (source)
2019-03-16 12:08:15 -0500 received badge Notable Question (source)
2019-03-16 12:08:15 -0500 received badge Popular Question (source)
2019-03-14 15:05:06 -0500 received badge Popular Question (source)
2019-03-07 07:32:05 -0500 received badge Student (source)
2019-03-07 07:32:04 -0500 marked best answer Another Celery remote debug issue, not working in a periodic task

I am trying to debug a tasks that was fired by celery beat and put in import wingdbstub in the task code.  The task fires and Celery responds but I get ModuleNotFoundError("No module named 'wingdbstub'",) when it hits import wingdbstub.  I have wingdbstub.py in every directory mentioned in the traceback at this point and in \celery and\celery\bin and it still isn't found.  It is working fine in the main celery code in site-packages when I look at other issues.  Any ideas where it might be looking?

[2017-09-16 20:21:36,213: INFO/MainProcess] Connected to sqla+sqlite:///tasks.sqlite
[2017-09-16 20:21:36,260: WARNING/MainProcess] celery@Eric-PC ready.
[2017-09-16 20:21:43,729: INFO/MainProcess] Received task: tasks.update_trader[7bc0b86f-561e-4638-807f-48149fde6efa]
[2017-09-16 20:21:43,744: INFO/MainProcess] **** update_trader
[2017-09-16 20:21:43,744: ERROR/MainProcess] Task tasks.update_trader[7bc0b86f-561e-4638-807f-48149fde6efa] raised unexpected: ModuleNotFoundError("No module named wingdbstub'",)Traceback (most recent call last): 
File "d:\svnrepo\projects-sw\eve_esi\trunk\env\lib\site-packages\celery\app\trace.py", line 240, in trace_task R = retval = fun(*args, **kwargs) 
File "D:\SVNRepo\projects-sw\EVE_ESI\trunk\env\src\app_web\extensions\celery_app.py", line 32, in __call__ return TaskBase.__call__(self, *args, **kwargs) 
File "d:\svnrepo\projects-sw\eve_esi\trunk\env\lib\site-packages\celery\app\trace.py", line 438, in __protected_call__ return self.run(*args, **kwargs) 
File "D:\SVNRepo\projects-sw\EVE_ESI\trunk\env\src\app_web\tasks\tasks.py", line 57, in update_trader import wingdbstubModuleNotFoundError: No module named 'wingdbstub'

This is on Win 7/64 with Python 3.6.2 and the latest Wing Pro.

2019-03-07 07:26:55 -0500 marked best answer Debugging Externally Launched Code (Celery)

Hi,

I'm trying remote debugging for the first time and can't get it to trigger.  I am trying to debug a problem I'm having getting Celery to run.  I've put the import wingdbstub, etc. code in my worker code and set a break point on the print statement.

celery_app.conf.imports = [ 'app_web.tasks.tasks']
import wingdbstub
x = 0 / 0
# 
import pdb; pdb.set_trace()
print(True)

When I ran Celery ( celery worker -A celery_worker.celery_app --loglevel=info ), the debugger didn't fire.  I added the pdb statements and I got a RuntimeError:WARNING: sys.settrace(<bound method="" bdb.trace_dispatch="" of="" <pdb.pdb="" object="" at="" 0x04c71d90="">>) called: This breaks some debugger functionality. Use 'Ignore this exception location' in the Exceptions tool and restart debugging to suppress this warning but since I didn't get an exception in the IDE I don't see how to ignore it.  

I then added the divide by 0 which throws an exception hoping to trigger the debugger but nope. File "D:\SVNRepo\projects-sw\ESI\trunk\env\src\celery_worker.py", line 46, in <module> x = 0 / 0ZeroDivisionError: division by zeroOn Windows celery.exe is starting the process but pdb has been triggering in celery_worker, can I get Wing to trigger?

Win 7/64, Python 3.6.2 (Anaconda), Wing 6.0.7-1 (rev 47fe5b0dd72b), accept debug connections is checked, wingdbstub.py and wingdebugpw are in the same directory as celery_worker.py

Thanks,

Eric

2019-03-07 07:26:52 -0500 received badge Self-Learner ( source )
2019-03-07 07:26:52 -0500 received badge Teacher ( source )
2017-09-18 23:35:00 -0500 commented answer Another Celery remote debug issue, not working in a periodic task

Should have remembered sys.path, since this is fired by celery.exe in the Scripts folder (in an Anaconda env) that was t

2017-09-17 22:05:00 -0500 asked a question Another Celery remote debug issue, not working in a periodic task

Another Celery remote debug issue, not working in a periodic task I am trying to debug a tasks that was fired by celery

2017-09-14 16:56:00 -0500 answered a question Debugging Externally Launched Code (Celery)

I switched over to adding wingdbstub to celery.py and, after resolving an issue with the port number that Wing was watch

2017-09-11 11:50:00 -0500 commented question Debugging Externally Launched Code (Celery)

Accept debug connections is checked and I'd already configured kLogFile to write to the same directory as the other file

2017-09-11 01:58:00 -0500 asked a question Debugging Externally Launched Code (Celery)

Debugging Externally Launched Code (Celery) Hi,I'm trying remote debugging for the first time and can't get it to trigge