GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cmd.get("enter", enter) AttributeError: 'str' object has no attribute 'get' · Issue #980 · tmux-python/tmuxp

cmd.get("enter", enter) AttributeError: 'str' object has no attribute 'get' #980

New issue
Copy link
New issue
Copy link
Open
#1012
Open
cmd.get("enter", enter) AttributeError: 'str' object has no attribute 'get'#980
#1012
Copy link

Description

@Javi3y
Javi3y
opened on Apr 27, 2025
Issue body actions

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'

Activity

  1. tony commented on Apr 27, 2025

    @tony
    tony
    on Apr 27, 2025
    Member
    More actions

    Can you show the new_session.

    Does this work

    import pprint
    
    pprint.pprint(new_session)
  2. Javi3y commented on Apr 27, 2025

    @Javi3y
    Javi3y
    on Apr 27, 2025
    Author
    More actions

    {'session_name': 'test',
    'windows': [{'focus': 'true',
    'layout': 'ab5d,82x41,0,0,0',
    'options': {},
    'panes': [{'focus': 'true', 'shell_command': ['zsh']}],
    'start_directory': '/home/javier',
    'window_name': 'zsh'}]}

  3. TobyKThurston
    added a commit that references this issue on Jan 28, 2026

    Fix shell_command string entries crashing builder (tmux-python#980)

    ace6086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.