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

Error while trying to ssh into a remote server on Pythonista 3 using Stash #123

Open
mbardolia opened this issue Dec 15, 2018 · 1 comment

Comments

@mbardolia
Copy link

I just recently installed Pythonista 3 on my iPad and installed Stash. When trying to ssh into a remote server, I receive the following error:

Exception in thread Thread-98:
Traceback (most recent call last):
  File "/var/containers/Bundle/Application/3B51BA3D-0C95-4DFC-BD6F-9478B30E671D/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/var/containers/Bundle/Application/3B51BA3D-0C95-4DFC-BD6F-9478B30E671D/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "Documents/site-packages/stash/bin/ssh.py", line 135, in stdout_thread
    self.update_screen()
  File "Documents/site-packages/stash/bin/ssh.py", line 142, in update_screen
    _stash.main_screen.load_pyte_screen(self.screen)
  File "/private/var/mobile/Containers/Shared/AppGroup/AADCB172-A760-4CAD-BB1C-21F0308B03B5/Pythonista3/Documents/site-packages/stash/system/shscreens.py", line 577, in load_pyte_screen
    c = pyte_screen.buffer[idx_line][idx_column]
TypeError: list indices must be integers or slices, not float

In reading some other threads I’ve gone through and installed paramiko and wcwidth in an effor to help resolve the issue. Any suggestions/guidance would be appreciated.

@superbobry
Copy link
Collaborator

Apologies for the delay. My guess would be that stash uses / division for line/column indices. On Python 3 / always produces a float. The fix is simple: replace it with flooring division //.

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