Hey Mosh, this is unacceptable

From chatGPT:

BROKER = “dramatiq.brokers.redis.RedisBroker”

from dramatiq import Worker

class Command(BaseCommand):
help = ‘Runs the Dramatiq worker’

def handle(self, *args, **kwargs):
worker = Worker(broker=BROKER)
worker.start()

import dramatiq

@dramatiq.actor
def send_email(to, subject, message):

Replace with your own email sending logic

send_mail(subject, message, ‘from@example.com’, [to])

send_email.send(“to@example.com”, “Hello!”, “This is a test message.”)

I hope this helps. Please keep us posted.

Ahh so you’ve attempted to use a different messenger to Celery? I was looking at using Huey just to get through this section of the course. Came up against the same Linux v Windows issue as I mention below though.

Question: Were you installing linux and using the WSL approach for Windows?
That’s the issue I’m having. I think the problem with my setup is that Python3.10 (which isn’t supported by Celery) is installed in my linux environment on windows and I’m struggling to figure out how to downgrade to Python3.9 without breaking everything. The breaking I have done a couple times already which was followed by complete reinstalls haha.

I think the problem with my setup is that Python3.10 (which isn’t supported by Celery) …

On Celery’s website they say Python 3.10 is supported. That’s what I’m using and it works.

https://docs.celeryq.dev/en/stable/getting-started/introduction.html#what-do-i-need

2 Likes

Can you please write every step here for installing celery if possible? I sorted out many errors but at last, it’s showing me an error at pipenv install. It’s failing to install and not able to create a virtual environment.

Have you installed pipenv by using command pip install pipenv

You can also create virtual env by using venv in python

I am trying but errors are coming with the path and env. Can you tell me how can we install with venv?

Heyy, i don’t know if you’re still interested in the course, but i feel your frustration when you made this post. I was also frustrated had to abandon the course since last year but randomly opened it this month and found a solution through the help of chatgpt of course lol… So it’s running celery inside a docker container instead of wsl. Wsl was a real pain. Read here… https://twitter.com/_ddddami/status/1634694329665986562?t=d-nLthcHZPDUdiWzkZXOXw&s=19
I hope this helos anyone stuck

1 Like

Thank you and yes, I am still interested in the course.

Funny, I’ve been using GPT to verify, create and debug code for other projects, and I never thought to use it to find a solution to this struggle.

Weirdly, my latest project will need Django. I was dreading diving back in, now maybe not so much.

What query did you use to get the solution?

I don’t know what you mean by query but the trick was running celery inside a docker container instead of using wsl ubuntu and all that which for caused a lot of weird errors. Read the chat here… https://chat.openai.com/chat/635139f9-1443-49b2-8017-d04d09f12f8e If you’re unable to read the chats, inform me so ill send screenshots instead. But you should be able to view it from your end

Must say/write. I know a bit about computers and security, still that part troubled me for two days.
I can’t really recall how I solved it, but the missing ‘Remote - WSL’ extension in Virtual Studio Code have shaken my ship. Now it’s sorta running.

This issue lowers the quality of your Django course from “WOW, perfect!” into “Standard online course”

Hello, anyway you could send me a screenshot? I am not able to view your conversation.

Hi there, I feel how things go… if all things go bad then reinstall all or some programs. That usually helps. If not, reset your windows pc and then install all the newest version of everything (just dont forget to save your projects on a hardrive). If I get stuck more than 3 days on something and used all stackflows advice, I know its not the code but the either one of the apps are corrupt/missing info/interfering with one another etc.