Glam Prestige Journal

Bright entertainment trends with youth appeal.

I have recently updated my Ubuntu from 19.10 to 20.04. During the installation and now when I am running apt update I see python related warnings:

/usr/lib/python3.8/subprocess.py:838: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used self.stdin = io.open(p2cwrite, 'wb', bufsize)

How can I fix that ?

1

2 Answers

Here, you can see a discussion about that:

And here a fix:

But remember ... it is not a bug, it's a feature :)

I have no such problem with "apt update" in 20.4

shell> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

In my case, the problem was caused by the Ansible plugin mitogen

shell> ansible-playbook --version
ansible-playbook 2.9.6 config file = /home/admin/.ansible.cfg configured module search path = ['/home/admin/.ansible/my_modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible executable location = /usr/bin/ansible-playbook python version = 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
shell> ansible localhost -m setup

/usr/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used return io.open(fd, *args, **kwargs)

The problem disappeared when I disabled mitogen

shell> grep strategy ansible.cfg
# strategy = mitogen_linear

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy