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

SyntaxError: invalid syntax #7

Open
1o1o1 opened this issue Aug 30, 2021 · 6 comments
Open

SyntaxError: invalid syntax #7

1o1o1 opened this issue Aug 30, 2021 · 6 comments

Comments

@1o1o1
Copy link

1o1o1 commented Aug 30, 2021

$ 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

@sk1418
Copy link
Owner

sk1418 commented Aug 31, 2021

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
Copy link
Owner

sk1418 commented Sep 3, 2021

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

@1o1o1
Copy link
Author

1o1o1 commented Sep 4, 2021

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

@sk1418
Copy link
Owner

sk1418 commented Sep 4, 2021

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

@1o1o1
Copy link
Author

1o1o1 commented Sep 4, 2021

i meant apps running in windows of terminals tmux!

@sk1418
Copy link
Owner

sk1418 commented Sep 4, 2021

@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.

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

No branches or pull requests

2 participants