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

ValueError: invalid width 0 (must be > 0) due to TERMWIDTH being 0 #172

Closed
sqlalchemy-bot opened this issue Jan 31, 2014 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Mickey (@mickey)

This issue only exists if you're running alembic from the commandline in a pseudo-terminal, such as Emacs's shell.

File util.py line 23 calls fcntl.ioctl which unpacks the number 0 into TERMWIDTH, but that is invalid according to the textwrap module, resulting in the aforementioned exception.

The fix is to assign None to TERMWIDTH (if 0) or replace the if check on line 182.

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

I think this is line 41 in latest master can you send a quick pullreq?

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

c1fcfae

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot sqlalchemy-bot added the bug Something isn't working label Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant