cmd.get("enter", enter) AttributeError: 'str' object has no attribute 'get'
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the freeze-and-rebuild example, then inspect tmuxp/workspace/builder.py around iter_create_panes(), especially the cmd.get("enter", enter) call. Trace the frozen session data passed into WorkspaceBuilder and determine what input shape causes the AttributeError. Done means the reported example rebuilds the session without this exception, with coverage for the corrected behavior if the repository has a relevant test location.
Written by the indexing model from the issue text.
Description
the code
from tmuxp.workspace.freezer import freeze
from tmuxp.workspace.builder import WorkspaceBuilder
from libtmux.server import Server
server = Server()
session = server.sessions.get(session_name="test", default=None)
if session:
new_session = freeze(session)
server.kill_session("test")
builder = WorkspaceBuilder(session_config=new_session, server=server)
builder.build()
error:
Traceback (most recent call last):
File "/home/javier/dotfiles/bin/.bin/kitty-workspaces-d/test.py", line 12, in <module>
builder.build()
~~~~~~~~~~~~~^^
File "/home/javier/dotfiles/bin/.bin/kitty-workspaces-d/.venv/lib/python3.13/site-packages/tmuxp/workspace/builder.py", line 323, in build
for pane, pane_config in self.iter_create_panes(window, window_config):
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/home/javier/dotfiles/bin/.bin/kitty-workspaces-d/.venv/lib/python3.13/site-packages/tmuxp/workspace/builder.py", line 552, in iter_create_panes
enter = cmd.get("enter", enter)
^^^^^^^
AttributeError: 'str' object has no attribute 'get'
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 248
- Avg merge
- 2h 13m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tmux-python/tmuxp
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
tmux-python/tmuxp#1026 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
tmux-python/tmuxp#939 · 1 comment ·
-
enhancement WorkspaceBuilder
Difficulty 4/5 3-5 days Newbie friendliness 48/100
tmux-python/tmuxp#1062 ·
-
enhancement need-comments WorkspaceBuilder
Difficulty 5/5 Over a week Newbie friendliness 35/100
tmux-python/tmuxp#1058 · 2 comments ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
tmux-python/tmuxp#1053 · 10 comments ·
All issues in tmux-python/tmuxp
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100