Skip to content

Authorize NotImplemented Error #24

@chheunpheara

Description

@chheunpheara

I have an issue with AuthorizeRequest as bellow

ERROR:ocpp:Error while handling request '<Call - unique_id=1000021, action=Authorize, payload={'idTag': '123'}>'
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/ocpp/charge_point.py", line 283, in _handle_call
    handlers = self.route_map[msg.action]
               ~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'Authorize'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/ocpp/charge_point.py", line 261, in route_message
    await self._handle_call(msg)
  File "/usr/local/lib/python3.12/site-packages/ocpp/charge_point.py", line 285, in _handle_call
    _raise_key_error(msg.action, self._ocpp_version)
  File "/usr/local/lib/python3.12/site-packages/ocpp/charge_point.py", line 170, in _raise_key_error
    raise NotImplementedError(
ocpp.exceptions.NotImplementedError: NotImplementedError: Request Action is recognized but not supported by the receiver,  {'cause': 'No handler for Authorize registered.'}
INFO:ocpp:wallbox: send [4,"1000021","NotImplemented","Request Action is recognized but not supported by the receiver",{"cause":"No handler for Authorize registered."}]```


My action handler below:
```@on(Action.Authorize)
    async def on_authorize(self_, id_tag):
        return call_result.Authorize(id_tag_info={'status': RegistrationStatus.accepted})```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions