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

Comments

Projects
None yet
1 participant
@sqlalchemy-bot

sqlalchemy-bot commented Jan 31, 2014

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

This comment has been minimized.

sqlalchemy-bot commented Jan 31, 2014

Michael Bayer (@zzzeek) wrote:

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

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Feb 2, 2014

Michael Bayer (@zzzeek) wrote:

c1fcfae

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Feb 2, 2014

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment