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

TypeError: 'NoneType' object is not callable on FreeBSD #98

Closed
vedranmiletic opened this issue Aug 2, 2024 · 4 comments
Closed

TypeError: 'NoneType' object is not callable on FreeBSD #98

vedranmiletic opened this issue Aug 2, 2024 · 4 comments
Assignees
Labels

Comments

@vedranmiletic
Copy link

FreeBSD 14.1, Python 3.11. I get:

% git fame
Traceback (most recent call last):
File "/home/vedran/workspace/website/.venv/bin/git-fame", line 5, in <module>
from gitfame import main
File "/home/vedran/workspace/website/.venv/lib/python3.11/site-packages/gitfame/__init__.py", line 1, in <module>
from ._gitfame import (__author__, __copyright__, __date__, __licence__, __license__, __version__,
File "/home/vedran/workspace/website/.venv/lib/python3.11/site-packages/gitfame/_gitfame.py", line 66, in <module>
from ._utils import (TERM_WIDTH, Str, TqdmStream, check_output, fext, int_cast_or_len, merge_stats,
File "/home/vedran/workspace/website/.venv/lib/python3.11/site-packages/gitfame/_utils.py", line 30, in <module>
TERM_WIDTH = _screen_shape_wrapper()(sys.stdout)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

Any ideas what to do?

@casperdcl
Copy link
Owner

what's the output of this?

import sys, tqdm
print(sys.platform)
print(tqdm.utils._screen_shape_linux(sys.stdout))

@vedranmiletic
Copy link
Author

what's the output of this?

import sys, tqdm
print(sys.platform)
print(tqdm.utils._screen_shape_linux(sys.stdout))
Python 3.11.9 (main, Jul 11 2024, 01:05:32) [Clang 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a on freebsd14
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, tqdm
>>> print(sys.platform)
freebsd14
>>> print(tqdm.utils._screen_shape_linux(sys.stdout))
(152, 45)

casperdcl added a commit to tqdm/tqdm that referenced this issue Aug 3, 2024
@casperdcl casperdcl reopened this Aug 3, 2024
@casperdcl
Copy link
Owner

casperdcl commented Aug 3, 2024

This should be fixed now if you upgrade to tqdm>=4.66.5.

@vedranmiletic
Copy link
Author

It works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants