Skip to content

[Bug] Python function report error Failed to load the crypto key reader from spec #24782

@jiangpengcheng

Description

@jiangpengcheng

Search before reporting

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

User environment

broker version: 1b74fe0

Issue Description

when running a python function without specify the crypto_spec.cryptoKeyReaderConfig, it runs well but will reports an error log:

[2025-09-25 07:26:59 +0000] [ERROR] python_instance.py: Failed to load the crypto key reader from spec: , error: Expecting value: line 1 column 1 (char 0)

Error messages

[2025-09-25 07:26:59 +0000] [ERROR] python_instance.py: Failed to load the crypto key reader from spec: , error: Expecting value: line 1 column 1 (char 0)

Reproducing the issue

  1. start the pulsar standalone
  2. create a python function:
pulsar-admin functions craete --py pulsar-functions/python-examples/exclamation_function.py --name package-python-fn --classname exclamation_function.ExclamationFunction --inputs persistent://public/default/package-py-fn-input --output persistent://public/default/package-py-fn-output
  1. check the function logs

Additional information

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions