aspiers / git-deps

git commit dependency analysis tool
GNU General Public License v2.0
297 stars 46 forks source link

ValueError: can't have unbuffered text I/O #87

Closed pwaller closed 3 years ago

pwaller commented 5 years ago

@bmwiedemann @aspiers I just bisected a failure to 76ea8fdcc88bcf23cf480350d09da7bc379d4f33. I can't get anything in git-deps to work after this PR #81. I'm using Python 3.6.7 on Ubuntu 18.04.

There is some interesting discussion on stack overflow:

Seems it isn't immediately obvious how to solve this so that it works equally well across different platforms and python versions.

Traceback (most recent call last):
  File "/home/pwaller/.local/bin/git-deps", line 10, in <module>
    sys.exit(run())
  File "/home/pwaller/git-deps/git_deps/cli.py", line 146, in run
    main(sys.argv[1:])
  File "/home/pwaller/git-deps/git_deps/cli.py", line 138, in main
    sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
  File "/usr/lib/python3.6/os.py", line 1017, in fdopen
    return io.open(fd, *args, **kwargs)
ValueError: can't have unbuffered text I/O
bmwiedemann commented 5 years ago

I wonder if it would make things easier if we required python3 (because python2 is nearly EOL)

aspiers commented 5 years ago

@bmwiedemann I don't want to introduce a hard dependency on Python 3 just for one tiny thing, if there is an easy way to fix it. #93 suggests there is, so please can you review that?

catskul commented 4 years ago

Still a problem. Can't run on 18.04 after installing with pip3

pwaller commented 4 years ago

Ping @aspiers it would be awesome to see this addressed. I know a few people who would like to use git-deps but I can't point them at it with this problem present.

aspiers commented 4 years ago

Noted @pwaller, thanks for the heads up and for being willing to share the project!

aspiers commented 3 years ago

@pwaller Very sorry for the long delay on this!