i3-layouts icon indicating copy to clipboard operation
i3-layouts copied to clipboard

Howto debug or log what is going on?

Open niksfirefly opened this issue 3 years ago • 4 comments

I use latest i3-layouts with Python 3.7.0 on Ubuntu 20.04 and It is not working at all

For example i3l vstack 0.6 gives {"success":true} and no changes

I also tried execute on start of i3 from config - not working too Is there any way to debug this situation?

regards

niksfirefly avatar May 31 '21 14:05 niksfirefly

Hey @niksfirefly ,

Thanks for trying i3-layouts. You can launch i3-layouts with the --debug flag to get some output. For example, in your i3 config file:

exec_always i3-layouts --debug > ~/i3-layouts.log 2>&1

If you do so, can you report the logs here ?

eliep avatar Jun 01 '21 07:06 eliep

[2021-06-01 11:28:10,228] DEBUG {handlers.py:17} - [ipc] tick event - payload:
[2021-06-01 11:28:43,616] DEBUG {handlers.py:34} - [ipc] workspace focus event - workspace:3, old:1
[2021-06-01 11:28:43,623] DEBUG {handlers.py:37} -   [ipc] workspace layouts exists for 3
[2021-06-01 11:28:43,623] DEBUG {state.py:237} - [state] rebuilding for RebuildCause.WORKSPACE_FOCUS
'Con' object has no attribute 'geometry'
Traceback (most recent call last):
  File "/opt/asdf/installs/python/3.7.0/bin/i3-layouts", line 8, in <module>
    sys.exit(main())
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3l/cli.py", line 5, in main
    connect()
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3l/connect.py", line 41, in connect
    i3.main()
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3ipc/connection.py", line 518, in main
    raise loop_exception
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3ipc/connection.py", line 497, in main
    while not self._event_socket_poll():
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3ipc/connection.py", line 477, in _event_socket_poll
    raise e
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3ipc/connection.py", line 474, in _event_socket_poll
    self._pubsub.emit(event_name, event)
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3ipc/_private/pubsub.py", line 28, in emit
    s['handler'](self.conn, data)
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3l/handlers.py", line 43, in _on_workspace_focus
    layout.mark_main(), layout.mark_last(), con_id)
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3l/state.py", line 238, in start_rebuild
    self.rebuild_action.start_rebuild(context, rebuild_cause, main_mark, last_mark, con_id)
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3l/state.py", line 175, in start_rebuild
    self.containers_to_recreate = self._containers_after(con_id, containers, context.workspace_sequence)
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3l/state.py", line 162, in _containers_after
    return [RebuildContainer(con) for con in containers
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3l/state.py", line 163, in <listcomp>
    if con_id == 0 or workspace_sequence.get_order(con.id) >= workspace_sequence.get_order(con_id)]
  File "/opt/asdf/installs/python/3.7.0/lib/python3.7/site-packages/i3l/state.py", line 78, in __init__
    self.x = container.geometry.x
AttributeError: 'Con' object has no attribute 'geometry'

niksfirefly avatar Jun 01 '21 09:06 niksfirefly

Hello, @eliep! Same here. It launches only from terminal and this way everything is ok.

It is not launching from i3/config and even from a separate bash script or through bindsym.

how it looks (normal, i suppose) when i launch it from a terminal: i3-layouts--debug

patroclus1 avatar Jun 20 '21 15:06 patroclus1

Hello, @eliep! Same here. It launches only from terminal and this way everything is ok.

It is not launching from i3/config and even from a separate bash script or through bindsym.

how it looks (normal, i suppose) when i launch it from a terminal: i3-layouts--debug

Install it with your package manager rather than pip or give it the absolute path of i3-layouts

Alighorab avatar Jan 13 '22 00:01 Alighorab