Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: unexpected error - 'NoneType' object has no attribute 'flush' #7465

Closed
pallavi176 opened this issue Mar 15, 2022 · 10 comments · Fixed by #7503
Closed

ERROR: unexpected error - 'NoneType' object has no attribute 'flush' #7465

pallavi176 opened this issue Mar 15, 2022 · 10 comments · Fixed by #7503
Labels
bug Did we break something? upstream Issues which need to be resolved in an upstream dependency

Comments

@pallavi176
Copy link

Bug Report

Reproduce

Expected

Environment information

Output of dvc doctor:

$ dvc doctor

Additional Information (if any):

@karajan1001
Copy link
Contributor

karajan1001 commented Mar 15, 2022

Excuse me , could you please provide some more details?
the output of dvc doctor -vv and which version what platform are you on.

@pallavi176
Copy link
Author

$ dvc doctor -vv
2022-03-16 09:46:31,907 TRACE: Namespace(cd='.', cmd='doctor', cprofile=False, cprofile_dump=None, func=<class 'dvc.commands.version.CmdVersion'>, instrument=False, instrument_open=False, pdb=False, quiet=0, verbose=2, version=None, viztracer=False, viztracer_depth=None, yappi=False)
DVC version: 2.9.5 (pip)

Platform: Python 3.7.11 on Windows-10-10.0.19041-SP0
Supports:
webhdfs (fsspec = 2022.2.0),
http (aiohttp = 3.8.1, aiohttp-retry = 2.4.5),
https (aiohttp = 3.8.1, aiohttp-retry = 2.4.5)
Cache types: https://error.dvc.org/no-dvc-cache
Caches: local
Remotes: None
Workspace directory: NTFS on C:
Repo: dvc, git
2022-03-16 09:46:36,193 DEBUG: Check for update is enabled.
2022-03-16 09:46:36,399 DEBUG: Trying to spawn '['daemon', '-q', 'updater']'
2022-03-16 09:46:36,451 DEBUG: Spawned '['daemon', '-q', 'updater']'
2022-03-16 09:46:36,470 DEBUG: Analytics is enabled.
2022-03-16 09:46:36,493 DEBUG: Trying to spawn '['daemon', '-q', 'analytics', 'C:\Users\PALLAV1.SAX\AppData\Local\Temp\tmpetdp7fj6']'
2022-03-16 09:46:36,573 DEBUG: Spawned '['daemon', '-q', 'analytics', 'C:\Users\PALLAV
1.SAX\AppData\Local\Temp\tmpetdp7fj6']'

==============================================================

$ dvc --version
2.9.5

==============================================================

Platform:
Windows 10
VSCode
Terminal GitBash
Conda environment

@pallavi176
Copy link
Author

History of commands I executed on VSCode Terminal GitBash:
conda create -n basic_demo python=3.7 -y
conda activate basic_demo
pip install dvc
touch stage_01.py stage_02.py
python stage_01.py
python stage_02.py
git init
dvc init
touch dvc.yaml
dvc repro

=======================================================
The code I was working on is available at below link:
https://github.com/pallavi176/AIops_dvc.git

@dtrifiro
Copy link
Contributor

dtrifiro commented Mar 16, 2022

Hey @pallavi176, could you try using WSL?

Related issue: https://discuss.dvc.org/t/error-unexpected-error-nonetype-object-has-no-attribute-flush/1031/7

It's likely due to tqdm, leaving these two PRs for reference
tqdm/tqdm#1248
tqdm/tqdm#1249

@dtrifiro dtrifiro added bug Did we break something? upstream Issues which need to be resolved in an upstream dependency labels Mar 16, 2022
@pallavi176
Copy link
Author

What is WSL? How can I use it?

@dtrifiro
Copy link
Contributor

@pallavi176
Copy link
Author

Thanks, I will try. But why can't I use dvc on windows?

@dtrifiro
Copy link
Contributor

It's related to the linked issue with the tqdm module, used by dvc to provide progress bar, which seems broken in gitbash. While we wait for the issue to be fixed upstream, the alternative is using WSL.

A workaround which does not involve using WSL would be trying to run dvc with the --quiet/-q flag. This will not print any output, but the command should complete succesfully.

@pallavi176
Copy link
Author

pallavi176 commented Mar 18, 2022

Thanks a lot

casperdcl added a commit to casperdcl/dvc that referenced this issue Mar 25, 2022
@casperdcl
Copy link
Contributor

Should be fixed now by tqdm/tqdm#1248 but opened a follow-up PR #7503 just in case :)

skshetry pushed a commit that referenced this issue Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Did we break something? upstream Issues which need to be resolved in an upstream dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants