f-strings with self.stdout management commands

56 views
Skip to first unread message

Matthew Pava

unread,
May 21, 2018, 10:21:39 AM5/21/18
to django...@googlegroups.com

I was using Python 3’s f-strings with self.stdout in a BaseCommand.

I keep getting this exception:

TypeError: ‘OutputWrapper’ object is not callable

 

Any ideas?

 

Matthew Pava

unread,
May 21, 2018, 10:24:42 AM5/21/18
to django...@googlegroups.com

Nevermind…

I was using self.stdout(f’’)

Instead of

self.stdout.write(f’’)

 

Go figure…

--
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.
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/ab17b313e3e44e01b7c9a3a55fddc7a5%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages