Re: glusterfind can't find modul utils.py

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

Looks like it is a python2 to python3 compatibility issue. It occurs because implicit imports within packages are not supported in python3.
This issue is resolved in the patch https://bugzilla.redhat.com/show_bug.cgi?id=1658116, which went in  glusterfs-6.0. Updating into recent glusterfs version should solve this problem.

Regards,
Shwetha

On Thu, Dec 5, 2019 at 6:08 PM David Spisla <spisla80@xxxxxxxxx> wrote:
Dear Gluster Community,

I tried to run glusterfind on my SLES15-SP1 machine using GlusterFS v5.10 but I got this error when performing it with user root:

fs-davids-c1-n1:~ # glusterfind create --help
Traceback (most recent call last):
  File "/usr/bin/glusterfind", line 14, in <module>
    from glusterfind.main import main
  File "/usr/lib/glusterfs/glusterfind/main.py", line 26, in <module>
    from utils import execute, is_host_local, mkdirp, fail
ModuleNotFoundError: No module named 'utils'

It seems to be not the default python3 utils module because I found in this path utils.py which has defined the function execute, is_host_local, mkdirp, fail :

fs-davids-c1-n1:~ # ll /usr/lib/glusterfs/glusterfind/
total 112
-rwxr-xr-x 1 root root  1846 Oct 11 04:53 S57glusterfind-delete-post.py
-rw-r--r-- 1 root root   381 Oct 11 04:53 __init__.py
drwxr-xr-x 2 root root  4096 Dec  4 10:03 __pycache__
-rwxr-xr-x 1 root root  3737 Oct 11 04:53 brickfind.py
-rwxr-xr-x 1 root root 15342 Oct 11 04:53 changelog.py
-rw-r--r-- 1 root root 16079 Oct 11 04:53 changelogdata.py
-rw-r--r-- 1 root root   851 Oct 11 04:53 conf.py
-rw-r--r-- 1 root root  2507 Oct 11 04:53 libgfchangelog.py
-rw-r--r-- 1 root root 33317 Oct 11 04:53 main.py
-rwxr-xr-x 1 root root  5092 Oct 11 04:53 nodeagent.py
-rw-r--r-- 1 root root   365 Oct 11 04:53 tool.conf
-rw-r--r-- 1 root root  7195 Oct 11 04:53 utils.py

Why glusterfind can't find this utils.py?
Regards
David Spisla
________

Community Meeting Calendar:

APAC Schedule -
Every 2nd and 4th Tuesday at 11:30 AM IST
Bridge: https://bluejeans.com/441850968

NA/EMEA Schedule -
Every 1st and 3rd Tuesday at 01:00 PM EDT
Bridge: https://bluejeans.com/441850968

Gluster-users mailing list
Gluster-users@xxxxxxxxxxx
https://lists.gluster.org/mailman/listinfo/gluster-users
________

Community Meeting Calendar:

APAC Schedule -
Every 2nd and 4th Tuesday at 11:30 AM IST
Bridge: https://bluejeans.com/441850968

NA/EMEA Schedule -
Every 1st and 3rd Tuesday at 01:00 PM EDT
Bridge: https://bluejeans.com/441850968

Gluster-users mailing list
Gluster-users@xxxxxxxxxxx
https://lists.gluster.org/mailman/listinfo/gluster-users

[Index of Archives]     [Gluster Development]     [Linux Filesytems Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux