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

dateutil not found #13

Closed
garrett opened this issue Aug 11, 2020 · 7 comments
Closed

dateutil not found #13

garrett opened this issue Aug 11, 2020 · 7 comments

Comments

@garrett
Copy link

garrett commented Aug 11, 2020

Running k3x from Flathub on Fedora 32 Silverblue, and I get:

GI search path:
[PRE-MAIN]  [search-path] - /usr/lib/x86_64-linux-gnu/girepository-1.0
[PRE-MAIN]  [search-path] - /app/lib/girepository-1.0
[PRE-MAIN]  [search-path] - /app/lib/girepository-1.0
[PRE-MAIN] Current LD_LIBRARY_PATH: /app/lib:/app/lib/x86_64-linux-gnu:/lib64:/lib:/usr/lib64:/usr/lib:/usr/local/lib
Traceback (most recent call last):
  File "/app/bin/k3x", line 61, in <module>
    from k3x import main
  File "/app/share/k3x/k3x/main.py", line 42, in <module>
    from .menu import K3dvMenu
  File "/app/share/k3x/k3x/menu.py", line 29, in <module>
    from .cluster_view import ClusterDialog
  File "/app/share/k3x/k3x/cluster_view.py", line 45, in <module>
    from .k3d import K3dCluster
  File "/app/share/k3x/k3x/k3d.py", line 27, in <module>
    from dateutil.parser import parse
ModuleNotFoundError: No module named 'dateutil'

FWIW: I don't have anything Kubernetes-related on my machine. (Not sure if it's needed or not; from the description, I assumed this should handle everything.)

@inercia
Copy link
Owner

inercia commented Aug 12, 2020

Hi @garrett. Thanks for reporting this problem. I think I know what happened: the dependency on the dateutil library was missing. I've added it in this commit in the FlatHub repo. The package should be rebuilt in the next hour or so. Please let me know if that fixes your problem.

@garrett
Copy link
Author

garrett commented Aug 13, 2020

Indeed, I think that fixes the problem. However, there's a new problem:

GI search path:
[PRE-MAIN]  [search-path] - /usr/lib/x86_64-linux-gnu/girepository-1.0
[PRE-MAIN]  [search-path] - /app/lib/girepository-1.0
[PRE-MAIN]  [search-path] - /app/lib/girepository-1.0
[PRE-MAIN] Current LD_LIBRARY_PATH: /app/lib:/app/lib/x86_64-linux-gnu:/lib64:/lib:/usr/lib64:/usr/lib:/usr/local/lib
2020-08-13 09:44:44,832 [MainThread  ] [DEBUG]  [MAIN] Creating settings manager...
2020-08-13 09:44:44,842 [MainThread  ] [DEBUG]  Creating settings in delayed mode...
2020-08-13 09:44:44,843 [MainThread  ] [INFO ]  Changing loglevel to 20
2020-08-13 09:44:44,843 [MainThread  ] [INFO ]  [MAIN] Using icon /home/garrett/.var/app/com.github.inercia.k3x/cache/icons/app.svg
2020-08-13 09:44:44,843 [MainThread  ] [INFO ]  [MAIN] Starting appindicator.Indicator
2020-08-13 09:44:44,872 [MainThread  ] [INFO ]  Creating/recreating docker client with DOCKER_HOST=unix:///var/run/docker.sock
2020-08-13 09:44:44,973 [MainThread  ] [ERROR]  Could not connect to Docker at
unix:///var/run/docker.sock:
('Connection aborted.', PermissionError(13, 'Permission denied'))

(k3x:2): Gtk-CRITICAL **: 09:44:45.003: gtk_entry_set_text: assertion 'text != NULL' failed
Traceback (most recent call last):
  File "/app/bin/k3x", line 62, in <module>
    sys.exit(main.main(VERSION))
  File "/app/share/k3x/k3x/main.py", line 139, in main
    _indicator = Indicator(version=version)  # NOTE: assign for keeping the object alive
  File "/app/share/k3x/k3x/main.py", line 113, in __init__
    self._keybinder = Keybindings(self._settings, self._shortcuts)
  File "/app/share/k3x/k3x/keybindings.py", line 85, in __init__
    self._keybinder = SystemHotkey(check_queue_interval=0.01)
  File "/app/lib/python3.7/site-packages/system_hotkey/system_hotkey.py", line 614, in __init__
    self.conn = xcffib.connect()
  File "/app/lib/python3.7/site-packages/xcffib/__init__.py", line 527, in __init__
    self.invalid()
  File "/app/lib/python3.7/site-packages/xcffib/__init__.py", line 559, in invalid
    raise ConnectionException(err)
xcffib.ConnectionException: Connection closed, error during parsing display string.

Perhaps we should close this and open a new issue though?

I do happen to have Docker installed as an overlay on my Silverblue system, but that's because I do development on Cockpit and have a bunch of things as overlay packages on my work system. (I work as much as I can in a toolbox container and in Flatpaks too, but some things need to be RPM overlays directly on the system if I don't want to have to build and run a VM for everything.)

Since this issue seems to be fixed, but there are other issues, I've opened more issues and am closing this one:

  1. When there's an error like this, it should open a window with the error instead of "doing nothing" if you run the app from the UI. Display errors in a graphical way #14
  2. Does k3x work with podman? Podman support? #15
  3. Can k3x work on Silverblue? Fedora Silverblue support? #16

@garrett garrett closed this as completed Aug 13, 2020
@smazurov
Copy link

smazurov commented Aug 13, 2020

Im running into the same issue (2nd one) and running non-silverblue Fedora 32. I thought it was due to moby-engine instead of docker, but I got docker working (aka docker ps returns containers), and still facing the issue.

k3d create cluster command works.

@garrett
Copy link
Author

garrett commented Aug 14, 2020

@smazurov: I think the issue is related to cgroups v2 and Docker (Moby) not supporting it properly. Can you run a Docker container on your system with sudo docker run -it alpine cat /etc/os-release ?

It should show things like PRETTY_NAME="Alpine Linux v3.12" and such if it works. Alpine is super-lightweight and a different distro, hence my suggestion on trying it.

If it doesn't work, is it related to cgroups v2? You'd probably see a similar error message as the third one in this comment on the Silverblue issue: #16 (comment)

The best solution would probably be to support podman (#15) and forget about Docker cgroups v2 support.

@inercia
Copy link
Owner

inercia commented Aug 14, 2020

@smazurov if k3d create cluster command works, could you try running k3x in a terminal with flatpak run --user com.github.inercia.k3x and get the debug logs? I would like to take a look at the logs for debugging the issue.

@smazurov
Copy link

Error log is in the second message in this thread. My docker works and I enabled old cgroups

@smazurov
Copy link

Here's the log:

$ flatpak run --user com.github.inercia.k3x 
GI search path:
[PRE-MAIN]  [search-path] - /usr/lib/x86_64-linux-gnu/girepository-1.0
[PRE-MAIN]  [search-path] - /app/lib/girepository-1.0
[PRE-MAIN]  [search-path] - /app/lib/girepository-1.0
[PRE-MAIN] Current LD_LIBRARY_PATH: /app/lib:/app/lib/x86_64-linux-gnu:/lib64:/lib:/usr/lib64:/usr/lib:/usr/local/lib
2020-08-20 16:03:57,497 [MainThread  ] [DEBUG]  [MAIN] Creating settings manager...
2020-08-20 16:03:57,502 [MainThread  ] [DEBUG]  Creating settings in delayed mode...
2020-08-20 16:03:57,503 [MainThread  ] [INFO ]  Changing loglevel to 20
2020-08-20 16:03:57,503 [MainThread  ] [INFO ]  [MAIN] Using icon /home/stepan/.var/app/com.github.inercia.k3x/cache/icons/app.svg
2020-08-20 16:03:57,503 [MainThread  ] [INFO ]  [MAIN] Starting appindicator.Indicator
2020-08-20 16:03:57,520 [MainThread  ] [INFO ]  Creating/recreating docker client with DOCKER_HOST=unix:///var/run/docker.sock

(k3x:2): Gtk-CRITICAL **: 16:03:57.645: gtk_entry_set_text: assertion 'text != NULL' failed
Traceback (most recent call last):
  File "/app/bin/k3x", line 62, in <module>
    sys.exit(main.main(VERSION))
  File "/app/share/k3x/k3x/main.py", line 139, in main
    _indicator = Indicator(version=version)  # NOTE: assign for keeping the object alive
  File "/app/share/k3x/k3x/main.py", line 113, in __init__
    self._keybinder = Keybindings(self._settings, self._shortcuts)
  File "/app/share/k3x/k3x/keybindings.py", line 85, in __init__
    self._keybinder = SystemHotkey(check_queue_interval=0.01)
  File "/app/lib/python3.7/site-packages/system_hotkey/system_hotkey.py", line 614, in __init__
    self.conn = xcffib.connect()
  File "/app/lib/python3.7/site-packages/xcffib/__init__.py", line 527, in __init__
    self.invalid()
  File "/app/lib/python3.7/site-packages/xcffib/__init__.py", line 559, in invalid
    raise ConnectionException(err)
xcffib.ConnectionException: Connection closed, error during parsing display string.

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

3 participants