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

ValueError: x not in list #3

Open
saraedum opened this issue Jul 23, 2021 · 2 comments
Open

ValueError: x not in list #3

saraedum opened this issue Jul 23, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@saraedum
Copy link

saraedum commented Jul 23, 2021

Running the version from #2, i3ipc-dynamic-tiling crashed at one point with this message:

2021-07-23 15:36:34,653 INFO: Workspace::Focus::3
2021-07-23 15:36:34,653 DEBUG: Workspace info: {'mode': 'tiled', 'name': '3', 'layout': 'splitv', 'children': [14, 15, 45, 26], 'tiled': [14, 15, 45, 26], 'descendants': [<i3ipc.con.Con object at 0x7fbb6ea152b0>, <i3ipc.con.Con object at 0x7fbb6ea159a0>, <i3ipc.con.Con object at 0x7fbb6e9e6b50>, <i3ipc.con.Con object at 0x7fbb6e9e6c10>, <i3ipc.con.Con object at 0x7fbb6e9e6dc0>, <i3ipc.con.Con object at 0x7fbb6e9e6f70>], 'id': 13, 'focused': 15, 'fullscreen': 0, 'unmanaged': [], 'glbl': {'mark': 'I3DT_GLBL_3', 'id': None, 'orientation': 'horizontal', 'layout': 'splith'}, 'main': {'mark': 'I3DT_MAIN_3', 'fullscreen': 0, 'id': 16, 'focus': 28, 'layout': 'splith', 'children': [14, 15, 45, 26]}, 'scnd': {'mark': 'I3DT_SCND_3', 'fullscreen': 0, 'id': None, 'focus': None, 'layout': 'splitv', 'children': []}}
2021-07-23 15:36:34,653 INFO: Window::Focus
list.remove(x): x not in list
Traceback (most recent call last):
  File "/home/jule/proj/archlinux/i3ipc-dynamic-tiling/i3ipc_dynamic_tiling.py", line 1276, in <module>
    IPC.main()
  File "/usr/lib/python3.9/site-packages/i3ipc/connection.py", line 514, in main
    raise loop_exception
  File "/usr/lib/python3.9/site-packages/i3ipc/connection.py", line 497, in main
    while not self._event_socket_poll():
  File "/usr/lib/python3.9/site-packages/i3ipc/connection.py", line 477, in _event_socket_poll
    raise e
  File "/usr/lib/python3.9/site-packages/i3ipc/connection.py", line 474, in _event_socket_poll
    self._pubsub.emit(event_name, event)
  File "/usr/lib/python3.9/site-packages/i3ipc/_private/pubsub.py", line 28, in emit
    s['handler'](self.conn, data)
  File "/home/jule/proj/archlinux/i3ipc-dynamic-tiling/i3ipc_dynamic_tiling.py", line 994, in on_window_focus
    info = get_workspace_info(ipc)
  File "/home/jule/proj/archlinux/i3ipc-dynamic-tiling/i3ipc_dynamic_tiling.py", line 151, in get_workspace_info
    info['unmanaged'].remove(cid)
ValueError: list.remove(x): x not in list
@chlyz chlyz added the bug Something isn't working label Jul 23, 2021
@chlyz
Copy link
Owner

chlyz commented Jul 23, 2021

Nice catch! This is a different error from what we have encountered before. I think I have seen this in my log at some point, but did not find anything in the code that could explain this. I will have a look tomorrow.

It would be nice if we could add the class and/or instance name of the container id to the log output, so that we may find a pattern to the workflow that causes this and be able to reproduce the issue.

Is there anything that you can remember from the workflow you have that could have triggered this?

I will try to add a safe-guard to this case tomorrow.

@saraedum
Copy link
Author

Is there anything that you can remember from the workflow you have that could have triggered this?

No. I was in a lengthy call and I think I've been using the mouse mostly. After a break I came back to my machine and the shortcuts that I have set up for i3ipc-dynamic-tiling didn't work anymore. So, no unfortunately I cannot recall the exact moment when this happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants