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

All commands throwing an error #25

Closed
travisroberts-sf opened this issue Aug 25, 2020 · 10 comments
Closed

All commands throwing an error #25

travisroberts-sf opened this issue Aug 25, 2020 · 10 comments

Comments

@travisroberts-sf
Copy link

When I issue any of the commands available (-c, -h or -n) (but not -v) I am getting the following exception and I'm not really sure where the error is stemming from:

myusernamehere@myusernamehere-ltm Downloads % itomate --help
usage: itomate [-h] [-c CONFIG] [-v] [-n]

Workflow automation and layouts for iTerm

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Path to the configuration file
  -v, --version         Show version
  -n, --new             Run in new window

For details on creating configuration files, please head to:

https://github.com/kamranahmedse/itomate
Traceback (most recent call last):
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 827, in transfer_data
    message = await self.read_message()
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 895, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 971, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 1051, in read_frame
    extensions=self.extensions,
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/framing.py", line 105, in read
    data = await reader(2)
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/asyncio/streams.py", line 677, in readexactly
    raise IncompleteReadError(incomplete, n)
asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/iterm2/connection.py", line 173, in _async_dispatch_forever
    data = await self.websocket.recv()
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 509, in recv
    await self.ensure_open()
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 803, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason

Any suggestions? I do have and use PyEnv on my laptop, could that have anything to do with it?

@JohnLegrandRichards
Copy link
Collaborator

@travisroberts-sf Are you able to run a .yml file at all or does that fail also?

@travisroberts-sf
Copy link
Author

Nope same thing:

myusernamehere@travisrober-ltm Downloads % itomate -c panes-only.yml
Traceback (most recent call last):
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/iterm2/connection.py", line 412, in async_connect
    return await coro(self)
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/iterm2/connection.py", line 219, in async_main
    result = await coro(connection)
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/itomate/itomate.py", line 200, in activate
    await render_tab_panes(curr_tab, tab_panes, profile_name)
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/itomate/itomate.py", line 74, in render_tab_panes
    current_session = await current_session.async_split_pane(vertical=True, profile=pofile_name)
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/iterm2/session.py", line 509, in async_split_pane
    result.split_pane_response.status))
iterm2.session.SplitPaneException: INVALID_PROFILE_NAME
Traceback (most recent call last):
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 827, in transfer_data
    message = await self.read_message()
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 895, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 971, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 1051, in read_frame
    extensions=self.extensions,
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/framing.py", line 105, in read
    data = await reader(2)
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/asyncio/streams.py", line 677, in readexactly
    raise IncompleteReadError(incomplete, n)
asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/iterm2/connection.py", line 173, in _async_dispatch_forever
    data = await self.websocket.recv()
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 509, in recv
    await self.ensure_open()
  File "/Users/myusernamehere/.pyenv/versions/3.7.0/lib/python3.7/site-packages/websockets/protocol.py", line 803, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
myusernamehere@myusernamehere-ltm Downloads %

@JohnLegrandRichards
Copy link
Collaborator

@travisroberts-sf Are you sure that the api permissions in iTerm2 were accepted properly?

@travisroberts-sf
Copy link
Author

other than checking the box that enables the API is there any other place that needs to be enabled/granted?

@travisroberts-sf
Copy link
Author

Any other thoughts of why this would be failing?

@JohnLegrandRichards
Copy link
Collaborator

@travisroberts-sf What is your python version and iTerm version? I noticed you also posted an issue that looks like you can now run a file. Is this issue still valid?

@travisroberts-sf
Copy link
Author

travisroberts-sf commented Aug 26, 2020 via email

@JohnLegrandRichards
Copy link
Collaborator

@travisroberts-sf There is a pull request open that fixes this issue. I was able to reproduce it.

@kamranahmedse
Copy link
Owner

Thanks, this should be fine in 0.3.9

@nerijunior
Copy link

nerijunior commented Oct 8, 2021

This problem was solved on 0.3.9? I'm with this version and it still happening.

Python 3.8.9 under asdf.

Traceback (most recent call last):
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/iterm2/connection.py", line 421, in async_connect
    return await coro(self)
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/iterm2/connection.py", line 228, in async_main
    result = await coro(connection)
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/itomate/itomate.py", line 192, in activate
    commands.insert(0, f"cd {root_path}")
AttributeError: 'str' object has no attribute 'insert'
Traceback (most recent call last):
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 944, in transfer_data
    message = await self.read_message()
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1013, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1089, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1144, in read_frame
    frame = await Frame.read(
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/asyncio/streams.py", line 721, in readexactly
    raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/iterm2/connection.py", line 182, in _async_dispatch_forever
    data = await self.websocket.recv()
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 552, in recv
    await self.ensure_open()
  File "/Users/neri/.asdf/installs/python/3.8.9/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 920, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1000 (OK); no close frame received

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

4 participants