Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legal information in Inpadoc is not retrieved correctly #168

Open
david-lightbringer opened this issue May 23, 2024 · 0 comments
Open

Legal information in Inpadoc is not retrieved correctly #168

david-lightbringer opened this issue May 23, 2024 · 0 comments

Comments

@david-lightbringer
Copy link

Seems like something has gone awry with the XML-schema for loading the legal information.

Here is a failing example:

from patent_client import Inpadoc
case = Inpadoc.objects.get("EP1000000A1")
print(case.legal)

With the following stack trace


  File "venv/lib/python3.12/site-packages/patent_client/_sync/epo/ops/util.py", line 80, in legal
    self._get_model(".legal.model.Legal", base_class=InpadocModel).objects.get(
  File "venv/lib/python3.12/site-packages/patent_client/_sync/epo/ops/legal/manager.py", line 20, in get
    return self.__schema__.load(LegalApi.get_legal(doc_number, doc_type, format)).events
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Schema.load() missing 1 required positional argument: 'obj'

NB: the LegalApi seems to work, so something has gone wrong with the parser (or really the setup of the Schema). So this works and is a possible workaround for others with the same specific error:

from patent_client._sync.epo.ops.legal.api import LegalApi
print(LegalApi.get_legal("EP1000000A1"))

Patent-client version: 5.0.13
Python version: 3.12
OS: MacOS 14.3

@david-lightbringer david-lightbringer changed the title Legal information in Inpadoc is not retrieved correce Legal information in Inpadoc is not retrieved correctly May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant