Skip to content

Getting an infinite loop while using pyfakefs together with tqdm on MacOS #570

Closed
@introkun

Description

@introkun

Describe the bug
Getting an infinite loop while using pyfakefs together with tqdm on MacOS.
I can see in the stdout:

Traceback (most recent call last):
  File "/Users/sergey/miniconda/envs/py385/lib/python3.8/multiprocessing/resource_tracker.py", line 191, in main
    cmd, name, rtype = line.strip().decode('ascii').split(':')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 0: ordinal not in range(128)

Switching to unittest module it solves the issue.

How To Reproduce
MacOS: Big Sur, 11.0.1 (20B29)
Python (in miniconda): 3.8.5

import tqdm
import time
import unittest
import pyfakefs
from pyfakefs.fake_filesystem_unittest import TestCase

class TestClass(TestCase):
	def setUp(self):
		self.setUpPyfakefs()
		pass

	def test_tqdm(self):
		with tqdm.tqdm(total=100, ascii=False) as pbar:
			for i in range(10):
				time.sleep(0.1)
				pbar.update(10)

if __name__ == "__main__":
	unittest.main()

Your enviroment

Python 3.8.5 (default, Sep  4 2020, 02:22:02)
[Clang 10.0.0 ]
pyfakefs 4.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions