Printing to console from async method inside django channels

229 views
Skip to first unread message

Chris Barry

unread,
Mar 8, 2018, 7:12:09 PM3/8/18
to Django users
I'm trying to print inside these methods in from this example in django channels:


But nothing is coming through to the console.

I haven't worked with python Async before, so I'm not sure if I'm doing something really stupid? The examples in the python docs seem to show prints working no problem

Andrew Godwin

unread,
Mar 9, 2018, 7:31:32 AM3/9/18
to django...@googlegroups.com
Hi Chris,

Since you also posted this to GitHub (https://github.com/django/channels/issues/967), I will answer there.

Andrew

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/abc849e2-11fe-49ca-a936-7dfaf5b811b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Barry

unread,
Mar 9, 2018, 7:42:16 AM3/9/18
to Django users
Thanks very much, double posting the solution here just in case it helps anyone else:


Ah, that didn't do it, so I did a full upgrade of channels, something in this set of upgrades sorted it.

pip install channels -U


Installing collected packages: asgiref, autobahn, daphne, Django, setuptools
Found existing installation: asgiref 2.1.6
Uninstalling asgiref-2.1.6:
Successfully uninstalled asgiref-2.1.6
Found existing installation: autobahn 17.10.1
Uninstalling autobahn-17.10.1:
Successfully uninstalled autobahn-17.10.1
Found existing installation: daphne 2.0.4
Uninstalling daphne-2.0.4:
Successfully uninstalled daphne-2.0.4
Found existing installation: Django 2.0.2
Uninstalling Django-2.0.2:
Successfully uninstalled Django-2.0.2
Found existing installation: setuptools 38.5.1
Uninstalling setuptools-38.5.1:
Successfully uninstalled setuptools-38.5.1
Successfully installed Django-2.0.3 asgiref-2.2.0 autobahn-18.3.1 daphne-2.1.0 setuptools-38.5.2



On Friday, 9 March 2018 12:31:32 UTC, Andrew Godwin wrote:
Hi Chris,

Since you also posted this to GitHub (https://github.com/django/channels/issues/967), I will answer there.

Andrew
On Thu, Mar 8, 2018 at 8:17 PM, Chris Barry <chris...@makemoredigital.com> wrote:
I'm trying to print inside these methods in from this example in django channels:


But nothing is coming through to the console.

I haven't worked with python Async before, so I'm not sure if I'm doing something really stupid? The examples in the python docs seem to show prints working no problem

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages