enthought / enthought/enstaller
enpkg 4.8.1 progress bar fails in Qtconsole shell
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
!enpkg scikit_learn
Fetching indices: .
Traceback (most recent call last):
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/bin/enpkg", line 10, in
sys.exit(main_noexc())
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enstaller/main.py", line 674, in main_noexc
main(argv)
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enstaller/main.py", line 665, in main
pat)
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enstaller/main.py", line 393, in dispatch_commands_with_enpkg
install_req(enpkg, config, req, args)
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enstaller/cli/utils.py", line 177, in install_req
enpkg.execute(actions)
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enstaller/enpkg.py", line 350, in execute
action.execute()
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enstaller/enpkg.py", line 100, in execute
for chunk_size in self.iter_execute():
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enstaller/enpkg.py", line 90, in iter_execute
package_metadata.size)
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enstaller/enpkg.py", line 228, in fetch_progress
return self.fetch_progress_factory("fetching", filename, size)
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enstaller/main.py", line 656, in fetch_progress_factory
**kw)
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/egginst/progress.py", line 38, in console_progress_manager_factory
first_line = _compute_optimal_first_line(message, filename)
File "/Users/jmarch/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/egginst/progress.py", line 13, in _compute_optimal_first_line
term_width = get_terminal_size()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce `!enpkg scikit_learn` in the Qtconsole shell and start with `egginst/progress.py`, especially `_compute_optimal_first_line` and its `get_terminal_size()` call; the traceback also points to `enstaller/main.py`. Done means the progress-bar setup no longer raises the reported `TypeError` and the package command can continue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100