'dict' object is not callable

I’m developing a custom component for image processing, and getting this error in the logs:

2021-04-30 11:14:10 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547491405776] 'dict' object is not callable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 167, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1481, in async_call
File "/usr/src/homeassistant/homeassistant/core.py", line 1516, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 477, in async_handle_core_service
errors = await conf_util.async_check_ha_config_file(hass)
File "/usr/src/homeassistant/homeassistant/config.py", line 904, in async_check_ha_config_file
res = await check_config.async_check_ha_config_file(hass)
File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 225, in async_check_ha_config_file
p_validated = platform_schema(p_validated)
TypeError: 'dict' object is not callable

I’ve tried lots of changing the PLATFORM_SCHEMA, but I still get this error. Here’s what I’m using:

from homeassistant.components.image_processing import (
CONF_CLASSIFIER = "classifier"
    vol.Required(CONF_ENTITY_ID): cv.entity_id,
    vol.Required(CONF_CLASSIFIER): cv.isfile,

Does anybody know how to fix this?

Edit: Random messing around fixed it.

The error message told you the problem:

p_validated = platform_schema(p_validated)

platform_schema is a dictionary, so if you want to get this value out of it, you need to use platform_schema['p_validated']. By using parentheses, you’re treating it like a function (callable).

I’m not running that function, I’m declaring PLATFORM_SCHEMA.