awesome-wm-widgets
awesome-wm-widgets copied to clipboard
Docker widget attempt to call a nil value (method 'buttons')
I'm getting the following error trying to load the docker widget
docker.lua:353: attempt to call a nil value (method 'buttons')
It's strange because it worked on my laptop last night when I added the widget. When I transferred my dotfiles over to my desktop this morning, I encountered this issue just with the docker widget.
Hm, I don't see anything suspicious there.
Can you run the following command: docker container ls -a -s -n
- is there anything wrong in the output? Can you share it?
You can also comment lines 353-367 and see what happens, maybe there will be another, more useful log message.
Here's the output, which looks fine.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE
75f4d3babc1a local-x86_64-0_builder "sleep infinity" 20 hours ago Up 20 hours local-x86_64-0_builder_1 7.24MB (virtual 3.39GB)
17e013b41e4c dog_dev_env "/ros_entrypoint.sh …" 45 hours ago Exited (0) 44 hours ago magical_mendel 69.8MB (virtual 7.35GB)
bcf5d7856cae 3f88974413a9 "/ros_entrypoint.sh …" 45 hours ago Exited (0) 45 hours ago intelligent_goldberg 237kB (virtual 8.76GB)
1b026f7a95d4 docker.eng.torc.tech/ros_bridge_x86_64:v1.1.5 "/entrypoint.sh rosl…" 46 hours ago Up 46 hours rosbridge 64.8kB (virtual 2.03GB)
45c93a6d371c docker.eng.torc.tech/ocu_web_x86_64:allnutt_target-debug-speeds-3 "/bin/sh -c ./ocu" 46 hours ago Up 46 hours ocu_web 0B (virtual 934MB)
6c910d3115c1 3f88974413a9 "/ros_entrypoint.sh …" 47 hours ago Exited (100) 47 hours ago goofy_northcutt 522MB (virtual 9.28GB)
7f22be860e6b dog_dev_env "/ros_entrypoint.sh …" 47 hours ago Exited (130) 47 hours ago gallant_blackwell 1.21GB (virtual 8.49GB)
0c2df9fcb8c3 dog_dev_env "/ros_entrypoint.sh …" 2 days ago Exited (0) 2 days ago nice_colden 237kB (virtual 7.28GB)
fa36c91ec9e6 dog_dev_env "/ros_entrypoint.sh …" 2 days ago Exited (128) 2 days ago gracious_blackwell 237kB (virtual 7.28GB)
6eb75727ae02 dog_dev_env "/ros_entrypoint.sh …" 2 days ago Exited (1) 2 days ago practical_swirles 237kB (virtual 7.28GB)
And commenting those lines doesn't throw any error. It just leaves an unclickable docker widget in the bar.
Here is the output of awesome --version
in case it matters
awesome v4.3-895-g538586c1 (Too long)
• Compiled against Lua 5.3.3 (running with Lua 5.3)
• API level: 4
• D-Bus support: yes
• xcb-errors support: no
• execinfo support: yes
• xcb-randr version: 1.6
• LGI version: 0.9.2
• Transparency enabled: yes
• Custom search paths: no
Same error here on awesome v4.3-902-gaba1cf398-dirty
.
Could you please try the latest master. Maybe the issue was in the deprecated function (awful.util.table.join
instead of gears.table.join
), however I'm using the same version of awesome as you, and don't have this issue.
I still have that issue being on commit https://github.com/streetturtle/awesome-wm-widgets/commit/9628b67801f79d98b6a2c5a9b90e3b3e439b69f5 and
$ awesome --version
awesome v4.3-1037-g149d18e0 (Too long)
• Compiled against Lua 5.3.3 (running with Lua 5.3)
• API level: 4
• D-Bus support: yes
• xcb-errors support: no
• execinfo support: yes
• xcb-randr version: 1.6
• LGI version: 0.9.2
• Transparency enabled: yes
• Custom search paths: no
gives me
error while running function!
stack traceback:
...nfig/awesome/awesome-wm-widgets/docker-widget/docker.lua:356: in function <...nfig/awesome/awesome-wm-widgets/docker-widget/docker.lua:90>
(...tail calls...)
/lhome/lindnfl/.config/awesome/rc.lua:570: in main chunk
error: ...nfig/awesome/awesome-wm-widgets/docker-widget/docker.lua:356: attempt to call a nil value (method 'buttons')
2021-06-02 16:00:14 W: awesome: a_glib_poll:471: Last main loop iteration took 0.282911 seconds! Increasing limit for this warning to that value.
rc.lua:570
is where the docker_widget()
call is situated.
Do you have more than one screen?
Yes, that's correct. The machine has 3 screens plugged in. The bar I use the docker widget in has no screen
parameter given, which makes it only appear one screen. (plan to change that later, but right how I am still playing around)
Could you please try to instantiate widget before this line:
awful.screen.connect_for_each_screen(function(s)
and then use it in the wibox layout.
So it would look something like this:
local dw = docker_widget()
awful.screen.connect_for_each_screen(function(s)
...
-- Add widgets to the wibox
s.mywibox:setup {
....
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
spacing = 8,
s.systray,
mykeyboardlayout,
dw, <--- here
So in case of multiple screens there will be only on instance of docker widget.
Maybe the same issue from https://github.com/streetturtle/awesome-wm-widgets/pull/373 ?
Sorry, no change, still the same message.
I do not have the same line, but
local dw = docker_widget()
screen.connect_signal("request::desktop_decoration", function(s)
-- Each screen has its own tag table.
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1])
[...]
-- use dw here
Error is docker.lua:372: attempts to call a nil value (method: 'buttons')
It happens even if I do not use dw
.