retmux icon indicating copy to clipboard operation
retmux copied to clipboard

SyntaxError: invalid syntax

Open 1o1o1 opened this issue 4 years ago • 6 comments
trafficstars

$ retmux -v retmux 1.0.2 $ retmux -b backing up the current tmux sessions 0:=:(,):=:1 Traceback (most recent call last): File "/usr/bin/retmux", line 92, in func(sys.argv[2]) File "/usr/lib/python2.7/site-packages/tmuxbk/controller.py", line 116, in do_backup backup.backup_tmux(name) File "/usr/lib/python2.7/site-packages/tmuxbk/backup.py", line 23, in backup_tmux tmux.sessions = load_sessions() File "/usr/lib/python2.7/site-packages/tmuxbk/backup.py", line 50, in load_sessions session.size = eval(s_l[1]) File "", line 1 (,) ^ SyntaxError: invalid syntax

1o1o1 avatar Aug 30 '21 23:08 1o1o1

thanks @1o1o1 Tmux 2.9 has removed some options:

The force-width and force-height options and the session_width and session_height formats have been removed.

The old backups can still be restored, however, the backup operation fails due to the usage of the removed options. I'll take a closer look at the problem and fix it.

sk1418 avatar Aug 31 '21 14:08 sk1418

@1o1o1 pushed a fix (v.1.0.3) in the master branch. You can give it a try.

sk1418 avatar Sep 03 '21 22:09 sk1418

Working ok) but when restore backup, programs not running automatically :(

1o1o1 avatar Sep 04 '21 08:09 1o1o1

If you meant the “programs “ is tmux, then it is fine. Because retmux restores sessions in detached mode. If you want to attach after the restore, you can try retmux -r xxx && tmux attach @1o1o1

sk1418 avatar Sep 04 '21 08:09 sk1418

i meant apps running in windows of terminals tmux!

1o1o1 avatar Sep 04 '21 10:09 1o1o1

@1o1o1 I don't get you. sorry. If you restore a backup inside an active tmux session, it should work too. You can use the list-session or prefix-s to see the restored sessions. If it was not what you meant, can you please tell me what did you do in each step? Or give this a try:

  • first backup sessions from the current tmux using retmux -b with or without name
  • if the backup is well done, run tmux kill-server (kill the tmux)
  • run retmux -r && tmux attach
  • Can you see your backup sessions get restored? I tested once yesterday, it works. Of course, probably, I could miss something.

sk1418 avatar Sep 04 '21 11:09 sk1418