thlautenschlaeger commented on issue #5912: "UNAVAILABLE: io exception" pulsar functions URL: https://github.com/apache/pulsar/issues/5912#issuecomment-568170225 Pulsar client is already installed. Got the newest version running `Python pulsar version : 2.4.2` Also checked my log. Pulsar is not finding the class WordCountFunction. Checked the name and everything. but it's not working. `excfunc-0.log` shows: ``` 10:03:54.137 [main] INFO org.apache.pulsar.functions.runtime.ProcessRuntimeFactory - Java instance jar location is not defined, using the location defined in system environment : /home/vagrant/apache-pulsar-2.4.2/instances/java-instance.jar 10:03:54.153 [main] INFO org.apache.pulsar.functions.runtime.ProcessRuntimeFactory - Python instance file location is not defined using the location defined in system environment : /home/vagrant/apache-pulsar-2.4.2/instances/python-instance/python_instance_main.py 10:03:54.154 [main] INFO org.apache.pulsar.functions.runtime.ProcessRuntimeFactory - No extra dependencies location is defined in either function worker config or system environment 10:03:54.268 [main] INFO org.apache.pulsar.functions.runtime.RuntimeSpawner - test/test/excfunc-0 RuntimeSpawner starting function ModuleNotFoundError: No module named 'WordCountFunction' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/vagrant/apache-pulsar-2.4.2/instances/python-instance/util.py", line 46, in import_class return import_class_from_path(api_dir, full_class_name) File "/home/vagrant/apache-pulsar-2.4.2/instances/python-instance/util.py", line 61, in import_class_from_path mod = importlib.import_module(class_name) File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'WordCountFunction' [2019-12-21 10:03:54 +0000] [CRITICAL] python_instance.py: Could not import User Function Module WordCountFunction [2019-12-21 10:03:54 +0000] [ERROR] log.py: Traceback (most recent call last): [2019-12-21 10:03:54 +0000] [ERROR] log.py: File "/home/vagrant/apache-pulsar-2.4.2/instances/python-instance/python_instance_main.py", line 211, in <module> [2019-12-21 10:03:54 +0000] [ERROR] log.py: main() [2019-12-21 10:03:54 +0000] [ERROR] log.py: File "/home/vagrant/apache-pulsar-2.4.2/instances/python-instance/python_instance_main.py", line 192, in main [2019-12-21 10:03:54 +0000] [ERROR] log.py: pyinstance.run() [2019-12-21 10:03:54 +0000] [ERROR] log.py: File "/home/vagrant/apache-pulsar-2.4.2/instances/python-instance/python_instance.py", line 196, in run [2019-12-21 10:03:54 +0000] [ERROR] log.py: raise NameError("Could not import User Function Module %s" % self.instance_config.function_details.className) [2019-12-21 10:03:54 +0000] [ERROR] log.py: NameError [2019-12-21 10:03:54 +0000] [ERROR] log.py: : [2019-12-21 10:03:54 +0000] [ERROR] log.py: Could not import User Function Module WordCountFunction ``` Do I need to place the python script that contains the `WordCountFunction` class in a specific location or do is special python setup necessary for pulsar?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
