Skip to content

[bug] launch gateway failed due to lack of __init__.py #36

@chenghuichen

Description

@chenghuichen

Description

launch gateway failed due to lack of __init__.py when calling importlib.resources.files(_JAVA_DEPS_PACKAGE)

Steps to Reproduce

use any pypaimon function which will trigger launch_gateway

Actual Behavior

Receiving error message:

Traceback (most recent call last):
  File "./ray/python/ray/data/_internal/datasource/paimon_datasource.py", line 283, in <module>
    catalog = Catalog.create(catalog_options)
  File "./ray/venv/lib/python3.9/site-packages/pypaimon/py4j/java_implementation.py", line 45, in create
    j_catalog_context = java_utils.to_j_catalog_context(catalog_options)
  File "./ray/venv/lib/python3.9/site-packages/pypaimon/py4j/util/java_utils.py", line 26, in to_j_catalog_context
    gateway = get_gateway()
  File "./ray/venv/lib/python3.9/site-packages/pypaimon/py4j/java_gateway.py", line 45, in get_gateway
    _gateway = launch_gateway()
  File "./ray/venv/lib/python3.9/site-packages/pypaimon/py4j/java_gateway.py", line 78, in launch_gateway
    p = launch_gateway_server_process(env)
  File "./ray/venv/lib/python3.9/site-packages/pypaimon/py4j/gateway_server.py", line 50, in launch_gateway_server_process
    classpath = _get_classpath(env)
  File "./ray/venv/lib/python3.9/site-packages/pypaimon/py4j/gateway_server.py", line 86, in _get_classpath
    jars = importlib.resources.files(_JAVA_DEPS_PACKAGE)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/resources.py", line 147, in files
    return _common.from_package(_get_package(package))
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/_common.py", line 14, in from_package
    return fallback_resources(package.__spec__)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/_common.py", line 18, in fallback_resources
    package_directory = pathlib.Path(spec.origin).parent
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/pathlib.py", line 1072, in __new__
    self = cls._from_parts(args, init=False)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/pathlib.py", line 697, in _from_parts
    drv, root, parts = self._parse_args(args)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/pathlib.py", line 681, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions