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

Install fails with two Python exceptions #53

Open
monotonee opened this issue Apr 12, 2021 · 1 comment · May be fixed by #54
Open

Install fails with two Python exceptions #53

monotonee opened this issue Apr 12, 2021 · 1 comment · May be fixed by #54

Comments

@monotonee
Copy link

The first exception is raised when I, on a Linux-based system using Python 3.9, attempt to install fluxclient without PCL extensions:

Traceback (most recent call last):
      File "${HOME}/src/third-party/fluxclient/setup_utils.py", line 180, in create_pcl_extentions
        raise RuntimeError("Can not locate pcl includes.")
    RuntimeError: Can not locate pcl includes.
    Traceback (most recent call last):
      File "${HOME}/src/third-party/fluxclient/setup_utils.py", line 180, in create_pcl_extentions
        raise RuntimeError("Can not locate pcl includes.")
    RuntimeError: Can not locate pcl includes.
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "${HOME}/src/third-party/fluxclient/setup.py", line 10, in <module>
        ext_modules += setup_utils.create_pcl_extentions()
      File "${HOME}/src/third-party/fluxclient/setup_utils.py", line 241, in create_pcl_extentions
        sys.stderr("""\033[93m
    TypeError: '_io.TextIOWrapper' object is not callable

When the former code error is corrected, the following exception is raised when execution is allowed to continue:

Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "${HOME}/src/third-party/fluxclient/setup.py", line 38, in <module>
        packages=setup_utils.get_packages(),
      File "${HOME}/src/third-party/fluxclient/setup_utils.py", line 91, in get_packages
        return [name
      File "${HOME}/src/third-party/fluxclient/setup_utils.py", line 91, in <listcomp>
        return [name
      File "/usr/lib/python3.9/pkgutil.py", line 88, in walk_packages
        for info in iter_modules(path, prefix):
      File "/usr/lib/python3.9/pkgutil.py", line 124, in iter_modules
        raise ValueError("path must be None or list of paths to look for "
    ValueError: path must be None or list of paths to look for modules in
@JasonShiao
Copy link

JasonShiao commented Jun 15, 2021

In setup_utils.py, find the following lines:

if has_package("pcl_common-1.8"):
    include_dirs += [locate_includes("pcl_common-1.8")]
    library_dirs += [locate_includes("pcl_common-1.8")]

and change the 1.8 to the exact version of libpcl-dev you have installed (it would very likely be 1.9)

and then find the following lines:

def get_packages():    
    return [name            
                 for _, name, ispkg in walk_packages(".")            
                 if name.startswith("fluxclient") and ispkg]

and change the string "." to a list ["."]

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

Successfully merging a pull request may close this issue.

2 participants