GhostManager / Ghostwriter

The SpecterOps project management and reporting engine
https://ghostwriter.wiki
BSD 3-Clause "New" or "Revised" License
1.36k stars 184 forks source link

'NoneType' error for Fetching NameCheap Domains #402

Closed BlueFootedBird closed 8 months ago

BlueFootedBird commented 8 months ago

When trying to use the function "tasks.fetch_namecheap_domains", I'm getting the following error:

'NoneType' object is not callable : Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/django_q/cluster.py", line 432, in worker
res = f(*task["args"], **task["kwargs"])
TypeError: 'NoneType' object is not callable

This is what my Scheduled Task looks like: image

And this is what the "Failed tasks" looks like: image

Expected Behavior I can authenticate to NameCheap given the API without any issues, and I can verify this under DJANGO Q --> Successful tasks. image

I'm doing this via the "Test Namecheap API" button located at the bottom of https://x.x.x.x/home/management/ image

I'm a bit confused because I don't know why I'm getting an error trying to run "tasks.fetch_namecheap_domains" when I'm getting success for testing my authentication to the API.

Any help would be greatly appreciated :)

Server Specs:

chrismaddalena commented 8 months ago

Hey @SecretSantaa, that error means Django Q couldn't find the function. You should be good to go with a small change to your task. Provide the full path to it, like you see in the authentication test result:

ghostwriter.shepherd.tasks.fetch_namecheap_domains

BlueFootedBird commented 8 months ago

You're a saint, thank you!