baredroid icon indicating copy to clipboard operation
baredroid copied to clipboard

Scripts not working

Open Lokiiiu opened this issue 9 years ago • 2 comments

python script under update folder tmux_manger.py is not working. CODE: #!/usr/bin/env python

import tmuxp

def tmux_init(devices, session_name):

#start server
server = tmuxp.Server()

#find the session created by the init script
session = server.findWhere({ "session_name": session_name })
#session = server.has_session(self, session_name)

#rename the first window
session.list_windows()[0].rename_window('main')
#session.list_windows()[0].split_window(attach=False)

#create a window containing the main log
winLog = session.new_window(attach=False, window_name='mainLog')
winLog.split_window(attach=False)

for id in devices:
    win = session.new_window(attach=False, window_name=str(id))
    win.split_window(attach=False)
    for p in win.list_panes():
        print p

return session

ERROR: File "/home/lokesh/Desktop/baredroid-master/update/tmux_manager.py", line 8, in tmux_init server = tmuxp.Server() AttributeError: 'module' object has no attribute 'Server'

Lokiiiu avatar Nov 05 '16 12:11 Lokiiiu

Can you share some hints about the problem, for example OS, tmuxp version? Do you have tmux installed on your OS? Did you try to run the tmux_manager.py directly or through the start_baredroid script?

smutti avatar Nov 06 '16 20:11 smutti

I installed all python library packages on Ubuntu 16.04LTS. I am trying to run script through start_baredroid. But in shows error like I showed in above issue.

Lokiiiu avatar Nov 06 '16 21:11 Lokiiiu