Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/693a7756-3a00-8011-8828-9989794d92e5
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== gpt-5-1 == === User: β― b2 --help === β― b2 --help Traceback (most recent call last): File "/usr/local/bin/b2", line 3, in <module> from b2._internal.b2v4.__main__ import main File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/b2/_internal/b2v4/__main__.py", line 13, in <module> main() [[User:Lukegao|Lukegao]] ([[User talk:Lukegao|talk]]) 05:17, 12 December 2025 (UTC)^^ File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/b2/_internal/console_tool.py", line 5635, in main exit_status = ct.run_command(sys.argv) File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/b2/_internal/console_tool.py", line 5462, in run_command parser = B2.create_parser(name=self.b2_binary_name, b2_binary_name=self.b2_binary_name) File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/b2/_internal/console_tool.py", line 1023, in create_parser parser = B2ArgumentParser('''parser_kwargs) File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/b2/_internal/arg_parser.py", line 104, in __init__ self._short_description = self._make_short_description( 05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)[[User:Lukegao|Lukegao]] ([[User talk:Lukegao|talk]])^ kwargs.get('usage', ''), kwargs.get('description', '') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/b2/_internal/arg_parser.py", line 144, in _make_short_description return self._encode_description(line.strip()) 05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)[[User:Lukegao|Lukegao]] ([[User talk:Lukegao|talk]]) 05:17, 12 December 2025 (UTC)^^^^^^^^^^^^^^ File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/b2/_internal/arg_parser.py", line 133, in _encode_description return rst2ansi(value.encode(encoding), output_encoding=encoding) File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/rst2ansi/__init__.py", line 48, in rst2ansi out = core.publish_string(input_string.decode('utf-8'), settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf'))) File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/docutils/core.py", line 460, in publish_string output, publisher = publish_programmatically( 05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)[[User:Lukegao|Lukegao]] ([[User talk:Lukegao|talk]]) 05:17, 12 December 2025 (UTC)^ source_class=io.StringInput, source=source, source_path=source_path, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... config_section=config_section, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ enable_exit_status=enable_exit_status) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/docutils/core.py", line 722, in publish_programmatically output = publisher.publish(enable_exit_status=enable_exit_status) File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/docutils/core.py", line 237, in publish output = self.writer.write(self.document, self.destination) File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/docutils/writers/__init__.py", line 80, in write self.translate() 05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)[[User:Lukegao|Lukegao]] ([[User talk:Lukegao|talk]]) 05:17, 12 December 2025 (UTC)^^ File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/rst2ansi/visitor.py", line 41, in translate visitor = self.translator_class(self.document, '''self.options) File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/rst2ansi/ansi.py", line 113, in __init__ self.termsize = termsize or get_terminal_size((80,20)) 05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)05:17, 12 December 2025 (UTC)~~^^^^^^^^^ File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/rst2ansi/get_terminal_size.py", line 116, in get_terminal_size size = _get_terminal_size(sys.__stdout__.fileno()) File "/usr/local/Cellar/b2-tools/4.4.2_1/libexec/lib/python3.14/site-packages/rst2ansi/get_terminal_size.py", line 75, in _get_terminal_size res = fcntl.ioctl(fd, termios.TIOCGWINSZ, b"\x00" * 4) SystemError: buffer overflow === Assistant: This is a known bug in some recent b2-tools / rst2ansi combinations on macOS, especially with Python 3.14. === This is a known bug in some recent b2-tools / rst2ansi combinations on macOS, especially with Python 3.14. The traceback shows: <syntaxhighlight>fcntl.ioctl(... TIOCGWINSZ ...) β SystemError: buffer overflow </syntaxhighlight> This happens because rst2ansi is calling get_terminal_size() in a way that is no longer compatible with Python 3.14 (Python changed some low-level ioctl argument handling). Good news: you can fix it, and the issue is not your fault. === β Fix Options (pick one) === ==== Option 1 β Run b2 with a safe TERM size override (quick workaround) ==== rst2ansi will not try ioctl if you force a fallback terminal size: <syntaxhighlight lang="bash">COLUMNS=80 LINES=24 b2 --help </syntaxhighlight> or: <syntaxhighlight lang="bash">export COLUMNS=80 export LINES=24 b2 --help </syntaxhighlight> If this works, it means the bug is specifically the ioctl call. ==== Option 2 β Install the Python 3.12-based build instead of Python 3.14 ==== Homebrew recently migrated many formulae to Python 3.14, but rst2ansi is not compatible. Check your brew version: <syntaxhighlight lang="bash">brew info b2-tools </syntaxhighlight> To downgrade: <syntaxhighlight lang="bash">brew uninstall b2-tools brew install b2-tools@4.4.1 </syntaxhighlight> or whatever the latest Python-3.12-based version is (Homebrew normally keeps one old revision). If that works, pin it: <syntaxhighlight lang="bash">brew pin b2-tools </syntaxhighlight> ==== Option 3 β Force pip version of rst2ansi that avoids the bug ==== (For users comfortable patching their Homebrew libexec) <syntaxhighlight lang="bash">pip3 install --force-reinstall "rst2ansi==0.1.5" </syntaxhighlight> Older versions avoid the broken TIOCGWINSZ call. You may need to run it inside b2's libexec Python: <syntaxhighlight lang="bash">/usr/local/Cellar/b2-tools/4.4.2_1/libexec/bin/pip install "rst2ansi==0.1.5" </syntaxhighlight> ==== Option 4 β Disable rst2ansi entirely ==== You can tell b2 to skip fancy formatting: <syntaxhighlight lang="bash">b2 --no-color --help </syntaxhighlight> Or: <syntaxhighlight lang="bash">export B2_USE_PLAIN_TEXT=1 </syntaxhighlight> (If the env var doesn't exist, you can patch it by editing the console tool, but usually --no-color is enough.) === β What I recommend === Start with easiest: 1οΈβ£ Try: <syntaxhighlight lang="bash">COLUMNS=80 LINES=24 b2 --help </syntaxhighlight> If it works β it's definitely the Python 3.14 ioctl bug. Then do: 2οΈβ£ Install older b2-tools linked against Python 3.12. If you want, I can: * Check what brew info b2-tools reports * Suggest the exact version to install based on your Homebrew versions * Provide a patch to fix the bug inside the installed package Just paste: <syntaxhighlight lang="bash">brew info b2-tools python3 --version </syntaxhighlight>
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)