Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save taniomi/c22e9495169bf2961d1784a54b62503c to your computer and use it in GitHub Desktop.

Select an option

Save taniomi/c22e9495169bf2961d1784a54b62503c to your computer and use it in GitHub Desktop.
Databricks Error: Received command c on object id p0

Problem

You see the error message INFO:py4j.java_gateway:Received command c on object id p0 after running Python code with imported libraries.

INFO:py4j.java_gateway:Received command c on object id p0
INFO:py4j.java_gateway:Received command c on object id p0
INFO:py4j.java_gateway:Received command c on object id p0
INFO:py4j.java_gateway:Received command c on object id p0

Solution

Set the log level to ERROR after importing python libraries:

%python

import logging
logger = spark._jvm.org.apache.log4j
logging.getLogger("py4j").setLevel(logging.ERROR)

Solution found in Databricks Knowledge Base and referenced in Stackoverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment